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

2733Execution semantics

Expand Messages
  • andrew cooke
    Nov 3, 2004
    • 0 Attachment
      Where can I find a clear description of how OCaml executes code. In
      particular, I want to understand when functions with several values are
      evaluated - is the evaluation progressive (during Currying) or is
      evaluation delayed until all arguments are present.

      For example, are the following equivalent, always?

      let example1 a b x =
      let a' = f1 a in
      let b' = f2 b in
      f3 a' b' x

      let example2 a b =
      let a' = f1 a in
      let b' = f2 b in
      fun x -> f3 a' b' x

      let example3 x a b =
      let a' = f1 a in
      let b' = f2 b in
      f3 a' b' x

      Thanks,
      Andrew

      --
      ` __ _ __ ___ ___| |_____ work web site: http://www.ctio.noao.edu/~andrew
      / _` / _/ _ \/ _ \ / / -_) personal web site: http://www.acooke.org/andrew
      \__,_\__\___/\___/_\_\___| list: http://www.acooke.org/andrew/compute.html
    • Show all 26 messages in this topic