Loading ...
Sorry, an error occurred while loading the content.

Re: >>=

Expand Messages
  • Dario Teixeira
    Hi, ... It is defined here: http://ocsigen.org/docu/1.2.0/Lwt.html Basically, x = y is an alternative notation for Lwt.bind x y. The Ocaml language allows
    Message 1 of 3 , Nov 17, 2009
    • 0 Attachment
      Hi,

      > What is that ">>="?
      > Does it have a name so that I could make some search about
      > it?

      It is defined here: http://ocsigen.org/docu/1.2.0/Lwt.html

      Basically, x >>= y is an alternative notation for Lwt.bind x y.
      The Ocaml language allows you to define new prefix or infix operators,
      since they are just syntactic sugar for function application. You can
      also treat an operator as a function by enclosing it with parentheses
      (which I'm sure you've seen by now; most tutorials cover this).

      Hope that helps,
      Dario Teixeira
    • Tim Hanson
      It is syntactic sugar for bind - see the documentation at http://ocsigen.org/docu/1.2.0/Lwt.html Tim On Tue, Nov 17, 2009 at 2:04 PM, Rakotomandimby Mihamina
      Message 2 of 3 , Nov 17, 2009
      • 0 Attachment
        It is syntactic sugar for 'bind' - see the documentation at
        http://ocsigen.org/docu/1.2.0/Lwt.html

        Tim

        On Tue, Nov 17, 2009 at 2:04 PM, Rakotomandimby Mihamina <
        mihamina@...> wrote:

        >
        >
        > Hi all,
        > In http://ocsigen.org/eliom/manual/1.2.0/2#p2sessiondata I find this
        > portion of code:
        > [...]
        > let session_data_example_with_post_params_handler sp _ login =
        > Eliom_sessions.close_session ~sp () >>= fun () ->
        > Eliom_sessions.set_volatile_session_data ~table:my_table ~sp login;
        > return
        > (html
        > (head (title (pcdata "")) [])
        > (body
        > [p [pcdata ("Welcome " ^ login ^ ". You are now connected.");
        > br ();
        > Eliom_predefmod.Xhtml.a session_data_example sp [pcdata "Try again"] ()
        > ]]))
        > [...]
        >
        > What is that ">>="?
        > Does it have a name so that I could make some search about it?
        >
        > Thank you.
        >
        > --
        > Architecte Informatique chez Blueline/Gulfsat:
        > Administration Systeme, Recherche & Developpement
        > +261 33 11 207 36
        >
        >


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.