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

Diff of /metaprl/theories/ocaml_doc/ocaml_doc_name1.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 98  Line 98 
98  @section[ocaml_doc_functions]{Functions}  @section[ocaml_doc_functions]{Functions}
99    
100  Functions are defined with the @tt{fun} keyword.  The @tt{fun} is  Functions are defined with the @tt{fun} keyword.  The @tt{fun} is
101  followed by a sequence of variables that name the arguments, and  followed by a sequence of variables that name the arguments, the
102  @code{->} separator, and the the body of the function.  By default,  @code{->} separator, and then the body of the function.  By default,
103  functions are not @emph{named}.  In ML, functions are values like any  functions are not @emph{named}.  In ML, functions are values like any
104  other.  They may be constructed, passed as arguments, and applied to  other.  They may be constructed, passed as arguments, and applied to
105  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 221  Line 221 
221  Suppose we want to define a recursive function: that is, a function  Suppose we want to define a recursive function: that is, a function
222  where the function is used in its own function body.  In functional  where the function is used in its own function body.  In functional
223  languages, recursion is used to express repetition and looping.  For  languages, recursion is used to express repetition and looping.  For
224  example, the the ``power'' function that computes $x^i$ would be  example, the ``power'' function that computes $x^i$ would be
225  defined as follows.  defined as follows.
226    
227  @begin[verbatim]  @begin[verbatim]

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

  ViewVC Help
Powered by ViewVC 1.1.26