/[mojave]/metaprl/theories/ocaml_doc/ocaml_doc_var1.ml
ViewVC logotype

Diff of /metaprl/theories/ocaml_doc/ocaml_doc_var1.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3583 by jyh, Mon Aug 6 16:25:57 2001 UTC revision 3584 by nogin, Thu Apr 25 15:28:40 2002 UTC
# Line 102  Line 102 
102  @section[ocaml_doc_functions]{Functions}  @section[ocaml_doc_functions]{Functions}
103    
104  Functions are defined with the @tt{fun} keyword.  The @tt{fun} is  Functions are defined with the @tt{fun} keyword.  The @tt{fun} is
105  followed by a sequence of variables that name the arguments, and  followed by a sequence of variables that name the arguments, the
106  @code{->} separator, and the the body of the function.  By default,  @code{->} separator, and then the body of the function.  By default,
107  functions are not @emph{named}.  In ML, functions are values like any  functions are not @emph{named}.  In ML, functions are values like any
108  other.  They may be constructed, passed as arguments, and applied to  other.  They may be constructed, passed as arguments, and applied to
109  specific arguments.  Like any other value, they may be named by using  specific arguments.  Like any other value, they may be named by using
# Line 225  Line 225 
225  Suppose we want to define a recursive function: that is, a function  Suppose we want to define a recursive function: that is, a function
226  where the function is used in its own function body.  In functional  where the function is used in its own function body.  In functional
227  languages, recursion is used to express repetition and looping.  For  languages, recursion is used to express repetition and looping.  For
228  example, the the ``power'' function that computes $x^i$ would be  example, the ``power'' function that computes $x^i$ would be
229  defined as follows.  defined as follows.
230    
231  @begin[verbatim]  @begin[verbatim]

Legend:
Removed from v.3583  
changed lines
  Added in v.3584

  ViewVC Help
Powered by ViewVC 1.1.26