Re: Re: Pure Functional programming in OCaml ????

"Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> Mon, 22 May 2017 12:48:39 -0500
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAM0XMJT8dyndjbmvEJG1CKbF3Vhooq3MSM8-sRUdBOKEaxX8xA@mail.gmail.com>
--001a11465e863096ca0550207baf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Danny,

That's what I had originally, but it would not compile.  I ***think*** (not
100% sure of this) the reason is that you can't have let-expressions in the
body of an if or else statement if the result of the statement is of type
unit.  OCaml has some strict rules about imperative code.  let expressions
usually work, but I don't think you can always use them to capture input
from the user, especially inside an if or else block that has output of
type unit.  I'm not really sure of the logic behind this language design
decision, but it sort of makes sense given OCaml's emphasis on "This part
of the program is functional and this other part of the program is
imperative".  I think Haskell puts an even stronger emphasis on separating
the functional and imperative parts of a program, although it should be
mentioned that any computer language that has any practical value at all
must have SOME imperative features.  I mean, without any side-effects at
all I think a programming language would be rather useless except for pure
computations.

Best,

Doug.


On Sun, May 21, 2017 at 8:57 AM, [email protected] [ocaml_beginners] <
[email protected]> wrote:

>
>
> It's easy to write fully functional programs in ocaml.  Just don't use th=
e
> non-functional stuff like ref variables and arrays.
>
> But the task you've set out for yourself is not something that can be don=
e
> in a fully functional way.  It requires writing to output which, by
> definition, is a side effect.  Similarly reading from user input cannot b=
e
> done in a purely functional way.  (Haskell can do both of these as well.)
>
> So ignoring that part, your program is already functional except for the
> superfluous use of "ref".
>
> Just delete the lines
>
> let n =3D ref 0 ;;
> let r =3D ref 0 ;;
>
> replace
>      n :=3D int_of_string (read_line ());
> with
>      let n =3D int_of_string (read_line ()) in
>
> replace
>      r :=3D int_of_string (read_line ());
> with
>      let r =3D int_of_string (read_line ()) in
>
> and replace "n.contents" with "n" and "r.contents" with "r".
>
> Then your program will be as functional as it can be.
>
> -- Danny Sleator
>
> ---In [email protected], <delewit@...> wrote :
>
> *(* Here I am experimenting with OCaml's module system to see what I can
> do with it! *)*
>
>
> *module type PascalsSig =3D *
>
> *(* pascals_Triangle and combination are the only "public methods"--using
> JAVA language--in the    *
>
> *   module, Pascal.  The other "methods" in the module are not available
> outside of the module.  *
>
> *   Again using JAVA language, we could say that those methods are
> "private methods". *) *
>
> *sig*
>
> *    val pascals_Triangle : int -> int list list ;;*
>
> *    val combination : int -> int -> int ;;*
>
> *end ;;*
>
>
> *module Pascal : PascalsSig =3D *
>
> *struct*
>
> *    let adjacent_sums list_ =3D let most =3D List.rev ( List.tl ( List.r=
ev
> list_ ) ) in *
>
> *                              let rest =3D List.tl list_ in *
>
> *                              let sum_pairs (t : int * int) : int =3D (f=
st
> t) + (snd t) in *
>
> *                              let adjacent_list =3D List.rev begin
> List.fold_left2 (fun x y z -> (y, z) :: x) [] most rest end *
>
> *                              in 1 :: begin List.map sum_pairs
> adjacent_list end @ [1] ;;*
>
>
> *    let rec pascals_triangle (triangle : int list list) (current_row :
> int list) (initial : int) (nrows : int) =3D *
>
> *            if nrows < 0 then raise ( Invalid_argument "Argument must be
> non-negative!" )*
>
> *            else if initial =3D nrows then [1] :: List.rev triangle *
>
> *                 else pascals_triangle (current_row :: triangle)
> (adjacent_sums current_row) (initial + 1) nrows ;;*
>
>
> *    (* Here is an example of partial function application. *)*
>
> *    let pascals_Triangle =3D pascals_triangle [] [1; 1] 0 ;;*
>
>
> *    let combination n r =3D let triangle =3D pascals_Triangle n in*
>
> *                          List.nth (List.nth triangle n) r ;;*
>
>
> *end ;;*
>
>
> *print_string "\nHow many rows of Pascal's Triangle do you want to
> compute? " ;;*
>
>
> *let nrows =3D read_int () ;;*
>
>
> *let rec print_int_list ( ls : int list ) : unit =3D *
>
> *                                           match ls with *
>
> *                                           |[]                ->
> print_endline "" ;*
>
> *                                           |head :: []        ->
> print_string (string_of_int head);*
>
> *
> print_int_list [];*
>
> *                                           |head :: tail      ->
> print_string (string_of_int head ^ ", "); *
>
> *
> print_int_list tail ;;*
>
>
> *print_newline () ;;*
>
>
> *List.map print_int_list (Pascal.pascals_Triangle (nrows - 1)) ;;*
>
>
> *print_newline () ;;*
>
>
>
> *let n =3D ref 0 ;;*
>
>
> *let r =3D ref 0 ;;*
>
>
> *print_string "Would you like to compute a specific Binomial Coefficient
> or C(n, r) value?  Answer Y or N: " ;;*
>
>
> *let user_input =3D read_line () ;;*
>
>
> *if user_input =3D "Y"*
>
> *then begin*
>
> *     print_string "Enter some positive integer for n: " ;*
>
> *     n :=3D int_of_string (read_line ()) ;*
>
> *     print_string "Enter some integer for r.\nr must be non-negative and
> less than or equal to n: " ;*
>
> *     r :=3D int_of_string (read_line ()) ;*
>
> *     print_endline ("The Binomial Coefficient or C(n, r) is equal to: " =
^
> (string_of_int (Pascal.combination n.contents r.contents))) ;*
>
> *     print_newline ();*
>
> *     end*
>
> *else*
>
> *     print_newline ();*
>
>
> I like this a lot.  I was playing around with OCaml (something I don't
> always have time for) and I really like how I got this done, and along th=
e
> way re-learned some stuff that I thought I had forgotten.  What's
> interesting to me is that the end of the program is almost entirely
> imperative, with all the user input and output.  "They" ( i.e. the
> functional programming experts ) claim that Haskell is purely functional,
> but if so then how does Haskell deal with stuff like user input, writing =
to
> standard output, generating random integers, etc?  Yes, I'm sure someone =
is
> going to tell me that Haskell uses "monads" to accomplish these miracles,
> but please don't use that word unless you are prepared to explain to me
> what a monad is!
>
>
> I did some online reading, and apparently monads are found in other
> languages too.  Scala has them, and I think OCaml has them as well, but
> they are sort of "hidden under the hood" so the programmer in those
> languages can work with monads without even really knowing what they are,
> or at least without knowing their formal definition.  Judging from the
> little I've read on the subject, I believe that "monads" are a way to
> completely separate the part of the language that is functional from the
> part of the language that produces side-effects.  I think in Haskell for
> example an IO Integer is not the same as an Integer, but then.... how doe=
s
> the programmer in Haskell cast one of those types to the other type?  If
> you can't cast an Integer type to an IO Integer type, then what does the
> Haskell programmer do if he or she wants to send the Integer value to
> standard output or to some file in the current working directory?  Very
> confusing!  OCaml is a little less intimidating to me because it's not
> fully functional.... although here's my question. * IF I REALLY WANTED
> TO, COULD I PROGRAM IN OCAML IN A PURELY FUNCTIONAL MANNER?*  Is that
> really possible?  No reference variables.  No for or while loops.  No
> side-effects?  The program above works great!  But what would it look lik=
e
> if I changed it to something that was completely, 100% purely functional,
> the OCaml equivalent to a Haskell program?
>
>
> I appreciate the feedback!
>
>
> Best,
>
>
> Douglas Lewit
>
>
>=20
>

--001a11465e863096ca0550207baf
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/htm=
l4/strict.dtd">
<html>
<head>
</head>






=20
<body style=3D"background-color: #fff;">
<span style=3D"display:none">&nbsp;</span>

<!--~-|**|PrettyHtmlStartT|**|-~-->
<div id=3D"ygrp-mlmsg" style=3D"position:relative;">
  <div id=3D"ygrp-msg" style=3D"z-index: 1;">
<!--~-|**|PrettyHtmlEndT|**|-~-->

    <div id=3D"ygrp-text" >
=20=20=20=20=20=20
=20=20=20=20=20=20
      <p><div dir=3D"ltr"><font size=3D"4">Hi Danny,</font><div><font size=
=3D"4"><br></font></div><div><font size=3D"4">That&#39;s what I had origina=
lly, but it would not compile.=C2=A0 I ***think*** (not 100% sure of this) =
the reason is that you can&#39;t have let-expressions in the body of an if =
or else statement if the result of the statement is of type unit.=C2=A0 OCa=
ml has some strict rules about imperative code. =C2=A0let expressions usual=
ly work, but I don&#39;t think you can always use them to capture input fro=
m the user, especially inside an if or else block that has output of type u=
nit.=C2=A0 I&#39;m not really sure of the logic behind this language design=
 decision, but it sort of makes sense given OCaml&#39;s emphasis on &quot;T=
his part of the program is functional and this other part of the program is=
 imperative&quot;.=C2=A0 I think Haskell puts an even stronger emphasis on =
separating the functional and imperative parts of a program, although it sh=
ould be mentioned that any computer language that has any practical value a=
t all must have SOME imperative features.=C2=A0 I mean, without any side-ef=
fects at all I think a programming language would be rather useless except =
for pure computations.</font></div><div><font size=3D"4"><br></font></div><=
div><font size=3D"4">Best,</font></div><div><font size=3D"4"><br></font></d=
iv><div><font size=3D"4">Doug.</font></div><div><font size=3D"4">=C2=A0=C2=
=A0</font></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_qu=
ote">On Sun, May 21, 2017 at 8:57 AM, <a href=3D"mailto:[email protected]"=
>[email protected]</a> [ocaml_beginners] <span dir=3D"ltr">&lt;<a href=3D"=
mailto:[email protected]" target=3D"_blank">ocaml_beginners@y=
ahoogroups.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"border-left:1px #ccc solid;">


<u></u>









=20
<div style=3D"background-color:#fff;">
<span>=C2=A0</span>


<div id=3D"m_1581773550153449060ygrp-mlmsg">
  <div id=3D"m_1581773550153449060ygrp-msg">


    <div id=3D"m_1581773550153449060ygrp-text">
=20=20=20=20=20=20
=20=20=20=20=20=20
      <p>It&#39;s easy to write fully functional programs in ocaml.=C2=A0 J=
ust don&#39;t use the non-functional stuff like ref variables and arrays.<b=
r><br>But the task you&#39;ve set out for yourself is not something that ca=
n be done in a fully functional way.=C2=A0 It requires writing to output wh=
ich, by definition, is a side effect.=C2=A0 Similarly reading from user inp=
ut cannot be done in a purely functional way.=C2=A0 (Haskell can do both of=
 these as well.)<br><br>So ignoring that part, your program is already func=
tional except for the superfluous use of &quot;ref&quot;.<br><br>Just delet=
e the lines <br><br>let n =3D ref 0 ;;<br>let r =3D ref 0 ;;<br><br>replace=
<br>=C2=A0=C2=A0=C2=A0=C2=A0 n :=3D int_of_string (read_line ());<br>with<b=
r>=C2=A0=C2=A0=C2=A0=C2=A0 let n =3D int_of_string (read_line ()) in<br><br=
>replace<br>=C2=A0=C2=A0=C2=A0=C2=A0 r :=3D int_of_string (read_line ());<b=
r>with<br>=C2=A0=C2=A0=C2=A0=C2=A0 let r =3D int_of_string (read_line ()) i=
n<br><br>and replace &quot;n.contents&quot; with &quot;n&quot; and &quot;r.=
contents&quot; with &quot;r&quot;.<br><br>Then your program will be as func=
tional as it can be.<br><br></p><div class=3D"m_1581773550153449060ygroups-=
quoted">-- Danny Sleator<br><br>---In <a href=3D"mailto:ocaml_beginners@yah=
oogroups.com" target=3D"_blank">ocaml_beginners@yahoogroups.<wbr>com</a>, &=
lt;delewit@...&gt; wrote :<br><br><div id=3D"m_1581773550153449060ygrps-yiv=
-2035233856"><div dir=3D"ltr"><p class=3D"m_1581773550153449060ygrps-yiv-20=
35233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856g=
mail-s1"><b><font color=3D"#0000ff">(* Here I am experimenting with OCaml&#=
39;s module system to see what I can do with it! *)</font></b></span></p><p=
 class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p2"><b><font color=
=3D"#0000ff"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-=
s1"></span><br></font></b></p><p class=3D"m_1581773550153449060ygrps-yiv-20=
35233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856g=
mail-s1"><b><font color=3D"#0000ff">module type PascalsSig =3D=C2=A0</font>=
</b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p=
1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><fo=
nt color=3D"#0000ff">(* pascals_Triangle and combination are the only &quot=
;public methods&quot;--using JAVA language--in the =C2=A0 =C2=A0</font></b>=
</span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><=
span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font c=
olor=3D"#0000ff">=C2=A0=C2=A0 module, Pascal.=C2=A0 The other &quot;methods=
&quot; in the module are not available outside of the module. =C2=A0</font>=
</b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p=
1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><fo=
nt color=3D"#0000ff">=C2=A0=C2=A0 Again using JAVA language, we could say t=
hat those methods are &quot;private methods&quot;. *)=C2=A0</font></b></spa=
n></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span =
class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=
=3D"#0000ff">sig</font></b></span></p><p class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-203=
5233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0 =C2=A0 val pascals_Trian=
gle : int -&gt; int list list ;;</font></b></span></p><p class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449=
060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0 =C2=A0 v=
al combination : int -&gt; int -&gt; int ;;</font></b></span></p><p class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">en=
d ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-203523=
3856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_15817735501534490=
60ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158177355015=
3449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">module Pasc=
al : PascalsSig =3D=C2=A0</font></b></span></p><p class=3D"m_15817735501534=
49060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">struct</font></b></spa=
n></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span =
class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=
=3D"#0000ff">=C2=A0 =C2=A0 let adjacent_sums list_ =3D let most =3D List.re=
v ( List.tl ( List.rev list_ ) ) in=C2=A0</font></b></span></p><p class=3D"=
m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 let rest =3D List.tl list_ in=C2=A0</font></b></sp=
an></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span=
 class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=
=3D"#0000ff">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 let sum_pairs (t : int * int) : =
int =3D (fst t) + (snd t) in=C2=A0</font></b></span></p><p class=3D"m_15817=
73550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_15817735501534=
49060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 let adjacent_list =3D List.rev begin List.fold_left2 (fun=
 x y z -&gt; (y, z) :: x) [] most rest end=C2=A0</font></b></span></p><p cl=
ass=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff"=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 in 1 :: begin List.map sum_pairs adjacent_l=
ist end @ [1] ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_15817=
73550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p cl=
ass=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff"=
>=C2=A0 =C2=A0 let rec pascals_triangle (triangle : int list list) (current=
_row : int list) (initial : int) (nrows : int) =3D=C2=A0</font></b></span><=
/p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span cla=
ss=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"=
#0000ff">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if nrows &lt; 0 then rai=
se ( Invalid_argument &quot;Argument must be non-negative!&quot; )</font></=
b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"=
><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font=
 color=3D"#0000ff">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else if initia=
l =3D nrows then [1] :: List.rev triangle=C2=A0</font></b></span></p><p cla=
ss=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1=
581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else pascals_=
triangle (current_row :: triangle) (adjacent_sums current_row) (initial + 1=
) nrows ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-=
2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_15817735501=
53449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D=
"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158177=
3550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=
=A0 =C2=A0 (* Here is an example of partial function application. *)</font>=
</b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p=
1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><fo=
nt color=3D"#0000ff">=C2=A0 =C2=A0 let pascals_Triangle =3D pascals_triangl=
e [] [1; 1] 0 ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_15817=
73550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p cl=
ass=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff"=
>=C2=A0 =C2=A0 let combination n r =3D let triangle =3D pascals_Triangle n =
in</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-20352338=
56gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s=
1"><b><font color=3D"#0000ff">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List.nth (List.nth triangle n=
) r ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035=
233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_158177355015344=
9060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_1=
581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550=
153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">end ;;</f=
ont></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gma=
il-p2"><b><font color=3D"#0000ff"><span class=3D"m_1581773550153449060ygrps=
-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_1581773550=
153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060=
ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">print_string &quot=
;\nHow many rows of Pascal&#39;s Triangle do you want to compute? &quot; ;;=
</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856=
gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_1581773550153449060yg=
rps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449=
060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">let nrows =3D r=
ead_int () ;;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-y=
iv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_15817735=
50153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">le=
t rec print_int_list ( ls : int list ) : unit =3D=C2=A0</font></b></span></=
p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span clas=
s=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#=
0000ff">=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 match ls with=C2=A0</font></b></span></p><p class=3D"m_158177=
3550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158177355015344=
9060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |[]=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -&gt;=C2=A0 print_endl=
ine &quot;&quot; ;</font></b></span></p><p class=3D"m_1581773550153449060yg=
rps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2=
035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |head :: []=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 -&gt;=C2=A0 print_string (string_of_int head);</font></b>=
</span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><=
span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font c=
olor=3D"#0000ff">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 print_int_list [];</font></b></span></p><p clas=
s=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_15=
81773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 |head :: tail=C2=A0 =C2=A0 =C2=A0 -&gt;=C2=A0 print_string (string_of_i=
nt head ^ &quot;, &quot;);=C2=A0</font></b></span></p><p class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449=
060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 print=
_int_list tail ;;</font></b></span></p><p class=3D"m_1581773550153449060ygr=
ps-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_1581=
773550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p c=
lass=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m=
_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff=
">print_newline () ;;</font></b></span></p><p class=3D"m_158177355015344906=
0ygrps-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p>=
<p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0=
000ff">List.map print_int_list (Pascal.pascals_Triangle (nrows - 1)) ;;</fo=
nt></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmai=
l-p2"><b><font color=3D"#0000ff"><span class=3D"m_1581773550153449060ygrps-=
yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_15817735501=
53449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060y=
grps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">print_newline () ;;=
</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856=
gmail-p2"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"=
><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0</font></b></span></p><p cla=
ss=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1=
581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=
let n =3D ref 0 ;;</font></b></span></p><p class=3D"m_1581773550153449060yg=
rps-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p><p =
class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"=
m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000f=
f">let r =3D ref 0 ;;</font></b></span></p><p class=3D"m_158177355015344906=
0ygrps-yiv-2035233856gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"></span><br></font></b></p>=
<p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0=
000ff">print_string &quot;Would you like to compute a specific Binomial Coe=
fficient or C(n, r) value?=C2=A0 Answer Y or N: &quot; ;;</font></b></span>=
</p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p2"><b><font=
 color=3D"#0000ff"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856=
gmail-s1"></span><br></font></b></p><p class=3D"m_1581773550153449060ygrps-=
yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-20352=
33856gmail-s1"><b><font color=3D"#0000ff">let user_input =3D read_line () ;=
;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-203523385=
6gmail-p2"><b><font color=3D"#0000ff"><span class=3D"m_1581773550153449060y=
grps-yiv-2035233856gmail-s1"></span><br></font></b></p><p class=3D"m_158177=
3550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158177355015344=
9060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">if user_input =
=3D &quot;Y&quot;</font></b></span></p><p class=3D"m_1581773550153449060ygr=
ps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-20=
35233856gmail-s1"><b><font color=3D"#0000ff">then begin</font></b></span></=
p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span clas=
s=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#=
0000ff">=C2=A0=C2=A0 =C2=A0 print_string &quot;Enter some positive integer =
for n: &quot; ;</font></b></span></p><p class=3D"m_1581773550153449060ygrps=
-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035=
233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 n :=3D int_o=
f_string (read_line ()) ;</font></b></span></p><p class=3D"m_15817735501534=
49060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 pr=
int_string &quot;Enter some integer for r.\nr must be non-negative and less=
 than or equal to n: &quot; ;</font></b></span></p><p class=3D"m_1581773550=
153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060=
ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=
=A0 r :=3D int_of_string (read_line ()) ;</font></b></span></p><p class=3D"=
m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">=C2=A0=
=C2=A0 =C2=A0 print_endline (&quot;The Binomial Coefficient or C(n, r) is e=
qual to: &quot; ^ (string_of_int (Pascal.combination n.contents r.contents)=
)) ;</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-203523=
3856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail=
-s1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 print_newline ();</font=
></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-=
p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><b><f=
ont color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 end</font></b></span></p><p class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-s1"><b><font color=3D"#0000ff">el=
se</font></b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-20352338=
56gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s=
1"><b><font color=3D"#0000ff">=C2=A0=C2=A0 =C2=A0 print_newline ();</font><=
/b></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1=
"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><br></s=
pan></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><spa=
n class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><font size=3D=
"4">I like this a lot.=C2=A0 I was playing around with OCaml (something I d=
on&#39;t always have time for) and I really like how I got this done, and a=
long the way re-learned some stuff that I thought I had forgotten.=C2=A0 Wh=
at&#39;s interesting to me is that the end of the program is almost entirel=
y imperative, with all the user input and output. =C2=A0&quot;They&quot; ( =
i.e. the functional programming experts ) claim that Haskell is purely func=
tional, but if so then how does Haskell deal with stuff like user input, wr=
iting to standard output, generating random integers, etc?=C2=A0 Yes, I&#39=
;m sure someone is going to tell me that Haskell uses &quot;monads&quot; to=
 accomplish these miracles, but please don&#39;t use that word unless you a=
re prepared to explain to me what a monad is! =C2=A0</font></span></p><p cl=
ass=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_=
1581773550153449060ygrps-yiv-2035233856gmail-s1"><font size=3D"4"><br></fon=
t></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"=
><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><font si=
ze=3D"4">I did some online reading, and apparently monads are found in othe=
r languages too.=C2=A0 Scala has them, and I think OCaml has them as well, =
but they are sort of &quot;hidden under the hood&quot; so the programmer in=
 those languages can work with monads without even really knowing what they=
 are, or at least without knowing their formal definition.=C2=A0 Judging fr=
om the little I&#39;ve read on the subject, I believe that &quot;monads&quo=
t; are a way to completely separate the part of the language that is functi=
onal from the part of the language that produces side-effects.=C2=A0 I thin=
k in Haskell for example an IO Integer is not the same as an Integer, but t=
hen.... how does the programmer in Haskell cast one of those types to the o=
ther type?=C2=A0 If you can&#39;t cast an Integer type to an IO Integer typ=
e, then what does the Haskell programmer do if he or she wants to send the =
Integer value to standard output or to some file in the current working dir=
ectory?=C2=A0 Very confusing!=C2=A0 OCaml is a little less intimidating to =
me because it&#39;s not fully functional.... although here&#39;s my questio=
n. <b><i>=C2=A0IF I REALLY WANTED TO, COULD I PROGRAM IN OCAML IN A PURELY =
FUNCTIONAL MANNER?</i></b> =C2=A0Is that really possible?=C2=A0 No referenc=
e variables.=C2=A0 No for or while loops.=C2=A0 No side-effects?=C2=A0 The =
program above works great!=C2=A0 But what would it look like if I changed i=
t to something that was completely, 100% purely functional, the OCaml equiv=
alent to a Haskell program?</font></span></p><p class=3D"m_1581773550153449=
060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-=
yiv-2035233856gmail-s1"><font size=3D"4"><br></font></span></p><p class=3D"=
m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773=
550153449060ygrps-yiv-2035233856gmail-s1"><font size=3D"4">I appreciate the=
 feedback!</font></span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035=
233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-2035233856gma=
il-s1"><font size=3D"4"><br></font></span></p><p class=3D"m_158177355015344=
9060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps=
-yiv-2035233856gmail-s1"><font size=3D"4">Best,</font></span></p><p class=
=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><span class=3D"m_158=
1773550153449060ygrps-yiv-2035233856gmail-s1"><font size=3D"4"><br></font><=
/span></p><p class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-p1"><s=
pan class=3D"m_1581773550153449060ygrps-yiv-2035233856gmail-s1"><font size=
=3D"4">Douglas Lewit</font></span></p><p class=3D"m_1581773550153449060ygrp=
s-yiv-2035233856gmail-p1"><span class=3D"m_1581773550153449060ygrps-yiv-203=
5233856gmail-s1"><font size=3D"4"><br></font></span></p></div></div></div><=
p></p>

    </div>
=20=20=20=20=20

=20=20=20=20
    <div style=3D"color:#fff;height:0;"></div>


</div>



=20=20






</div></div></blockquote></div><br></div>
</p>

    </div>
=20=20=20=20=20

    <!--~-|**|PrettyHtmlStart|**|-~-->
    <div style=3D"color: #fff; height: 0;">__._,_.___</div>

=20=20=20=20=20=20=20=20=20=20
=20=20
=20

=20=20=20=20
    <div style=3D"clear:both"> </div>

    <div id=3D"fromDMARC" style=3D"margin-top: 10px;">
        <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; background=
-color:#E3E3E3;">
        Posted by: Douglas Lewit &lt;[email protected]&gt;        <hr style=
=3D"height:2px ; border-width:0; color:#E3E3E3; background-color:#E3E3E3;">
     </div>
    <div style=3D"clear:both"> </div>

    <table cellspacing=3D4px style=3D"margin-top: 10px; margin-bottom: 10px=
; color: #2D50FD;">
      <tbody>
        <tr>
          <td style=3D"font-size: 12px; font-family: arial; font-weight: bo=
ld; padding: 7px 5px 5px;"  >
                          <a style=3D"text-decoration: none; color: #2D50FD=
" href=3D"https://groups.yahoo.com/neo/groups/ocaml_beginners/conversations=
/messages/14813;_ylc=3DX3oDMTJxMmFmYjNlBF9TAzk3MzU5NzE0BGdycElkAzQ5OTkxOTQE=
Z3Jwc3BJZAMxNzA1MDA2NzY0BG1zZ0lkAzE0ODEzBHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTQ=
5NTQ3NTMyMQ--?act=3Dreply&messageNum=3D14813">Reply via web post</a>
                      </td>
          <td>&bull;</td>
          <td style=3D"font-size: 12px; font-family: arial; padding: 7px 5p=
x 5px;" >
            <a href=3D"mailto:[email protected]?subject=3DRe%3A%20%22ocaml_=
beginners%22%3A%3A%5B%5D%20Re%3A%20Pure%20Functional%20programming%20in%20O=
Caml%20%3F%3F%3F%3F" style=3D"text-decoration: none; color: #2D50FD;">
               Reply to sender            </a>
          </td>
          <td>&bull;</td>
          <td style=3D"font-size: 12px; font-family: arial; padding: 7px 5p=
x 5px;">
            <a href=3D"mailto:[email protected]?subject=3DRe%=
3A%20%22ocaml_beginners%22%3A%3A%5B%5D%20Re%3A%20Pure%20Functional%20progra=
mming%20in%20OCaml%20%3F%3F%3F%3F" style=3D"text-decoration: none; color: #=
2D50FD">
              Reply to group            </a>
          </td>
          <td>&bull;</td>
          <td style=3D"font-size: 12px; font-family: arial; padding: 7px 5p=
x 5px;" >
            <a href=3D"https://groups.yahoo.com/neo/groups/ocaml_beginners/=
conversations/newtopic;_ylc=3DX3oDMTJlOG02bmtxBF9TAzk3MzU5NzE0BGdycElkAzQ5O=
TkxOTQEZ3Jwc3BJZAMxNzA1MDA2NzY0BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTQ5NTQ3NTMy=
MQ--" style=3D"text-decoration: none; color: #2D50FD">Start a New Topic</a>
          </td>
          <td>&bull;</td>
          <td style=3D"font-size: 12px; font-family: arial; padding: 7px 5p=
x 5px;color: #2D50FD;" >
                            <a href=3D"https://groups.yahoo.com/neo/groups/=
ocaml_beginners/conversations/topics/14811;_ylc=3DX3oDMTM2cHZpdjI1BF9TAzk3M=
zU5NzE0BGdycElkAzQ5OTkxOTQEZ3Jwc3BJZAMxNzA1MDA2NzY0BG1zZ0lkAzE0ODEzBHNlYwNm=
dHIEc2xrA3Z0cGMEc3RpbWUDMTQ5NTQ3NTMyMQR0cGNJZAMxNDgxMQ--" style=3D"text-dec=
oration: none; color: #2D50FD;">Messages in this topic</a>
                (3)
                      </td>
        </tr>
      </tbody>
    </table>

=20=20=20=20=20=20=20=20
<div id=3D"megaphoneModule">
            <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; backgr=
ound-color:#E3E3E3;">
        <div>
	     <div class=3D"stream" style=3D"margin-bottom:10px;">
        <div style=3D"background-color:white;">
            <div class=3D"sn-img" style=3D"display:inline;"><img name=3D"tn=
_file" style=3D"padding:0px 10px;vertical-align:top;margin-top:5px;" src=3D=
"https://s.yimg.com/ru/static/images/yg/img/megaphone/1464031581_phpFA8bON"=
 height=3D"82" width=3D"82"></div>
            <div class=3D"mod-txt" style=3D"display:inline-block;">
                <a rel=3D"nofollow" name=3D"sub_url" target=3D"_blank" href=
=3D"https://yho.com/1wwmgg" style=3D"color:#0000FF;display:block;margin-lef=
t:5px;text-decoration:none;"><span style=3D"font-size:15px;">Have you tried=
 the highest rated email app?</span></a>
                <div style=3D"max-width:530px;padding:2px 5px;">With 4.5 st=
ars in iTunes, the Yahoo Mail app is the highest rated email app on the mar=
ket. What are you waiting for? Now you can access all your inboxes (Gmail, =
Outlook, AOL and more) in one place. Never delete an email again with 1000G=
B of free cloud storage.</div>
            </div>
        </div>
    </div>        </div>=20=20
=20=20=20=20=20
    <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; background-col=
or:#E3E3E3;">
</div>

<!------- Start Nav Bar ------>


    <div id=3D"ygrp-grfd" style=3D"font-family: Verdana; font-size: 12px; p=
adding: 15px 0;">
=20=20=20=20=20=20
<!-- |**|begin egp html banner|**| -->

      Archives up to December 31, 2011 are also downloadable at <a href=3D"=
http://www.connettivo.net/cntprojects/ocaml_beginners">http://www.connettiv=
o.net/cntprojects/ocaml_beginners</a><BR>
The archives of the very official ocaml list (the seniors' one) can be foun=
d at <a href=3D"http://caml.inria.fr">http://caml.inria.fr</a><BR>
Attachments are banned and you're asked to be polite, avoid flames etc.    =
=20=20
<!-- |**|end egp html banner|**| -->

    </div>
=20=20

=20

<!-- |**|begin egp html banner|**| -->
<div id=3D"ygrp-vital" style=3D"background-color: #f2f2f2; font-family: Ver=
dana; font-size: 10px; margin-bottom: 10px; padding: 10px;">

    <span id=3D"vithd" style=3D"font-weight: bold; color: #333; text-transf=
orm: uppercase; "><a href=3D"https://groups.yahoo.com/neo/groups/ocaml_begi=
nners/info;_ylc=3DX3oDMTJlOG02NTQ0BF9TAzk3MzU5NzE0BGdycElkAzQ5OTkxOTQEZ3Jwc=
3BJZAMxNzA1MDA2NzY0BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTQ5NTQ3NTMyMQ--" style=
=3D"text-decoration: none;">Visit Your Group</a></span>

     <ul style=3D"list-style-type: none; margin: 0; padding: 0; display: in=
line;">
            <li style=3D"border-right: 1px solid #000; font-weight: 700; di=
splay: inline; padding: 0 5px; margin-left: 0;">
      <span class=3D"cat"><a href=3D"https://groups.yahoo.com/neo/groups/oc=
aml_beginners/members/all;_ylc=3DX3oDMTJmcDVia3BqBF9TAzk3MzU5NzE0BGdycElkAz=
Q5OTkxOTQEZ3Jwc3BJZAMxNzA1MDA2NzY0BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzE0OTU0N=
zUzMjE-" style=3D"text-decoration: none;">New Members</a></span>
      <span class=3D"ct" style=3D"color: #ff7900;">1</span>
    </li>
                                              </ul>
  </div>


<div id=3D"ft" style=3D"font-family: Arial; font-size: 11px; margin-top: 5p=
x; padding: 0 2px 0 0; clear: both;">
  <a href=3D"https://groups.yahoo.com/neo;_ylc=3DX3oDMTJkcjMzMW00BF9TAzk3ND=
c2NTkwBGdycElkAzQ5OTkxOTQEZ3Jwc3BJZAMxNzA1MDA2NzY0BHNlYwNmdHIEc2xrA2dmcARzd=
GltZQMxNDk1NDc1MzIx" style=3D"float: left;"><img src=3D"http://l.yimg.com/r=
u/static/images/yg/img/email/new_logo/logo-groups-137x15.png" height=3D"15"=
 width=3D"137" alt=3D"Yahoo! Groups" style=3D"border: 0;"/></a>
  <div style=3D"color: #747575; float: right;"> &bull; <a href=3D"https://i=
nfo.yahoo.com/privacy/us/yahoo/groups/details.html" style=3D"text-decoratio=
n: none;">Privacy</a> &bull; <a href=3D"mailto:ocaml_beginners-unsubscribe@=
yahoogroups.com?subject=3DUnsubscribe" style=3D"text-decoration: none;">Uns=
ubscribe</a> &bull; <a href=3D"https://info.yahoo.com/legal/us/yahoo/utos/t=
erms/" style=3D"text-decoration: none;">Terms of Use</a> </div>
</div>
<br>

<!-- |**|end egp html banner|**| -->

  </div> <!-- ygrp-msg -->

=20
  <!-- Sponsor -->
  <!-- |**|begin egp html banner|**| -->
  <div id=3D"ygrp-sponsor" style=3D"width:160px; float:right; clear:none; m=
argin:0 0 25px 0; background: #fff;">

<!-- Start Recommendations -->
<div id=3D"ygrp-reco">
     </div>
<!-- End Recommendations -->



  </div>   <!-- |**|end egp html banner|**| -->

  <div style=3D"clear:both; color: #FFF; font-size:1px;">.</div>
</div>

  <img src=3D"http://geo.yahoo.com/serv?s=3D97359714/grpId=3D4999194/grpspI=
d=3D1705006764/msgId=3D14813/stime=3D1495475321" width=3D"1" height=3D"1"> =
<br>

<img src=3D"http://y.analytics.yahoo.com/fpc.pl?ywarid=3D515FB27823A7407E&a=
=3D10001310322279&js=3Dno&resp=3Dimg&cf12=3DCP" width=3D"1" height=3D"1">=20

<div style=3D"color: #fff; height: 0;">__,_._,___</div>
<!--~-|**|PrettyHtmlEnd|**|-~-->

</body>

<!--~-|**|PrettyHtmlStart|**|-~-->
<head>
  <style type=3D"text/css">
  <!--
  #ygrp-mkp {
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 10px 0;
  padding: 0 10px;
}

#ygrp-mkp hr {
  border: 1px solid #d8d8d8;
}

#ygrp-mkp #hd {
  color: #628c2a;
  font-size: 85%;
  font-weight: 700;
  line-height: 122%;
  margin: 10px 0;
}

#ygrp-mkp #ads {
  margin-bottom: 10px;
}

#ygrp-mkp .ad {
  padding: 0 0;
}

#ygrp-mkp .ad p {
  margin: 0;
}

#ygrp-mkp .ad a {
  color: #0000ff;
  text-decoration: none;
}
  #ygrp-sponsor #ygrp-lc {
  font-family: Arial;
}

#ygrp-sponsor #ygrp-lc #hd {
  margin: 10px 0px;
  font-weight: 700;
  font-size: 78%;
  line-height: 122%;
}

#ygrp-sponsor #ygrp-lc .ad {
  margin-bottom: 10px;
  padding: 0 0;
}

  #actions {
    font-family: Verdana;
    font-size: 11px;
    padding: 10px 0;
  }

  #activity {
    background-color: #e0ecee;
    float: left;
    font-family: Verdana;
    font-size: 10px;
    padding: 10px;
  }

  #activity span {
    font-weight: 700;
  }

  #activity span:first-child {
    text-transform: uppercase;
  }

  #activity span a {
    color: #5085b6;
    text-decoration: none;
  }

  #activity span span {
    color: #ff7900;
  }

  #activity span .underline {
    text-decoration: underline;
  }

  .attach {
    clear: both;
    display: table;
    font-family: Arial;
    font-size: 12px;
    padding: 10px 0;
    width: 400px;
  }

  .attach div a {
    text-decoration: none;
  }

  .attach img {
    border: none;
    padding-right: 5px;
  }

  .attach label {
    display: block;
    margin-bottom: 5px;
  }

  .attach label a {
    text-decoration: none;
  }
=20=20
  blockquote {
    margin: 0 0 0 4px;
  }

  .bold {
    font-family: Arial;
    font-size: 13px;
    font-weight: 700;
  }

  .bold a {
    text-decoration: none;
  }

  dd.last p a {
    font-family: Verdana;
    font-weight: 700;
  }

  dd.last p span {
    margin-right: 10px;
    font-family: Verdana;
    font-weight: 700;
  }

  dd.last p span.yshortcuts {
    margin-right: 0;
  }

  div.attach-table div div a {
    text-decoration: none;
  }

  div.attach-table {
    width: 400px;
  }

  div.file-title a, div.file-title a:active, div.file-title a:hover, div.fi=
le-title a:visited {
    text-decoration: none;
  }

  div.photo-title a, div.photo-title a:active, div.photo-title a:hover, div=
.photo-title a:visited {
    text-decoration: none;
  }

  div#ygrp-mlmsg #ygrp-msg p a span.yshortcuts {
    font-family: Verdana;
    font-size: 10px;
    font-weight: normal;
  }

  .green {
    color: #628c2a;
  }

  .MsoNormal {
    margin: 0 0 0 0;
  }

  o {
    font-size: 0;
  }

  #photos div {
    float: left;
    width: 72px;
  }

  #photos div div {
    border: 1px solid #666666;
    height: 62px;
    overflow: hidden;
    width: 62px;
  }

  #photos div label {
    color: #666666;
    font-size: 10px;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    width: 64px;
  }

  #reco-category {
    font-size: 77%;
  }

  #reco-desc {
    font-size: 77%;
  }

  .replbq {
    margin: 4px;
  }

  #ygrp-actbar div a:first-child {
   /* border-right: 0px solid #000;*/
    margin-right: 2px;
    padding-right: 5px;
  }

  #ygrp-mlmsg {
    font-size: 13px;
    font-family: Arial, helvetica,clean, sans-serif;
    *font-size: small;
    *font: x-small;
  }

  #ygrp-mlmsg table {
    font-size: inherit;
    font: 100%;
  }

  #ygrp-mlmsg select, input, textarea {
    font: 99% Arial, Helvetica, clean, sans-serif;
  }

  #ygrp-mlmsg pre, code {
    font:115% monospace;
    *font-size:100%;
  }

  #ygrp-mlmsg * {
    line-height: 1.22em;
  }

  #ygrp-mlmsg #logo {
    padding-bottom: 10px;
  }


  #ygrp-msg p a {
    font-family: Verdana;
  }

  #ygrp-msg p#attach-count span {
    color: #1E66AE;
    font-weight: 700;
  }

  #ygrp-reco #reco-head {
    color: #ff7900;
    font-weight: 700;
  }

  #ygrp-reco {
    margin-bottom: 20px;
    padding: 0px;
  }

  #ygrp-sponsor #ov li a {
    font-size: 130%;
    text-decoration: none;
  }

  #ygrp-sponsor #ov li {
    font-size: 77%;
    list-style-type: square;
    padding: 6px 0;
  }=20

  #ygrp-sponsor #ov ul {
    margin: 0;
    padding: 0 0 0 8px;
  }

  #ygrp-text {
    font-family: Georgia;
  }

  #ygrp-text p {
    margin: 0 0 1em 0;
  }

  #ygrp-text tt {
    font-size: 120%;
  }

  #ygrp-vital ul li:last-child {
    border-right: none !important;=20
  }=20
  -->
  </style>
</head>

<!--~-|**|PrettyHtmlEnd|**|-~-->
</html>
<!-- end group email -->


--001a11465e863096ca0550207baf--