Version française
Home     About     Download     Resources     Contact us    
Browse thread
More problems with memoization
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andrej Bauer <Andrej.Bauer@f...>
Subject: Re: [Caml-list] More problems with memoization
Andrej Bauer wrote:
> let fib, fib_mem =
>   let fib' self = function
>     | 0 -> 0
>     | 1 -> 1
>     | n -> self (n - 1) + self (n - 2)
>   in
>     make_rec fib', make_mem fib

I apologize, the last line should read

   make_rec fib', make_mem fib'

An apostrophe is missing.

Andrej