Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: e@flavors.com (Doug Currie, Flavors Technology, Inc.)
To: "QUERCIA Michel (T) Math" <querciam@l-carnot1.ac-dijon.fr>,
	"'caml-list@pauillac.inria.fr'" <caml-list@pauillac.inria.fr>
Subject: Re: recursive definition
Date: Tue, 23 Apr 1996 20:38:44 -0400	[thread overview]
Message-ID: <v01540b04ada3284fdf2d@[204.5.215.14]> (raw)


>let rec fib = remember(fun x ->
>  if x < 2 then 1 else fib(x-1) + fib(x-2)
>);;
>EntrHe interactive:
>>..............remember(fun x ->
>>  if x < 2 then 1 else fib(x-1) + fib(x-2)
>>).......
>Ce genre d'expressions n'est pas autorisH comme membre droit d'un "let
>rec".

How about:

#let rec fib x = remember(fun x ->
  if x < 2 then 1 else fib(x-1) + fib(x-2)
) x ;;

e







             reply	other threads:[~1996-04-24  8:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-24  0:38 Doug Currie, Flavors Technology, Inc. [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-04-25 21:41 Tarizzo Martial
1996-04-29  8:54 ` Xavier Leroy
1996-04-24 19:17 Damien Doligez
1996-04-23 22:12 Tarizzo Martial
1996-04-22 19:16 QUERCIA Michel (T) Math

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='v01540b04ada3284fdf2d@[204.5.215.14]' \
    --to=e@flavors.com \
    --cc=caml-list@pauillac.inria.fr \
    --cc=querciam@l-carnot1.ac-dijon.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox