caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Loup Vaillant" <loup.vaillant@gmail.com>
To: Andrej.Bauer@andrej.com
Cc: "Caml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Unexpected restriction in "let rec" expressions
Date: Wed, 27 Feb 2008 10:43:18 +0100	[thread overview]
Message-ID: <6f9f8f4a0802270143o68c58cbfh2ea059cda5c0a744@mail.gmail.com> (raw)
In-Reply-To: <47C524F3.9030005@fmf.uni-lj.si>

OK, I'm starting to understand all this a bit more, thank you all.

2008/2/26, Nicolas Pouillard <nicolas.pouillard@gmail.com>:
> A picture can helps...
>
>      +---------+
>   a>-|         |->c
>      |    x    |
>   b>-|         |->b
>      +---------+
>
>      +---------+
>   a>-|         |->c
>      |    y    |
>   +->-|         |->-+
>   |   +---------+   |
>   +--------b--------+
>
>  loop x = y

I saw this image before, but despite of its clarity, it hasn't solved
my problem: the chicken and egg one. See, the looping "b" in y looks
like it has to be produced out of thin air. The only solution I can
guess is that x must, for some value of "a", produce the outputs "c"
and "b" independently of the input "b". Then, the recursion in loop
must reach this particular value of "a".

Maybe I could understand this by writing a factorial function, using a
non recursive function and loop (I hope this is possible).

2008/2/27, Andrej Bauer <Andrej.Bauer@fmf.uni-lj.si>:
>  where the name "fix" suggests that we will plug in a fix-point operator
>  at the end of the day. Before reading on, you should try to write down a
>  term of type (2), given that we have fix. I will bet that your brain
>  will produce the same solution as described below.

It did :-), but it will take a bit of my time to understand the rest.

Cheers,
Loup


  reply	other threads:[~2008-02-27  9:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 12:24 Loup Vaillant
2008-02-26 14:04 ` [Caml-list] " Jean-Christophe Filliâtre
2008-02-26 14:18 ` Damien Doligez
2008-02-26 14:34   ` Loup Vaillant
2008-02-26 14:51     ` Gabriel Kerneis
2008-02-26 14:56     ` blue storm
2008-02-26 17:48     ` Nicolas Pouillard
2008-02-26 14:57 ` Dirk Thierbach
2008-02-27  8:53 ` Andrej Bauer
2008-02-27  9:43   ` Loup Vaillant [this message]
2008-02-27 12:02     ` Dirk Thierbach
2008-02-27 14:04       ` Loup Vaillant
2008-02-27 16:41         ` Dirk Thierbach
2008-02-27 23:32           ` Loup Vaillant
2008-02-27 19:03 ` Pal-Kristian Engstad
2008-02-27 23:46   ` Loup Vaillant

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=6f9f8f4a0802270143o68c58cbfh2ea059cda5c0a744@mail.gmail.com \
    --to=loup.vaillant@gmail.com \
    --cc=Andrej.Bauer@andrej.com \
    --cc=caml-list@inria.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;
as well as URLs for NNTP newsgroup(s).