Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: variables in 'let rec'
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@m...>
Subject: Re: variables in 'let rec'
Damien Doligez wrote:
> 
> >From: Max Skaller <maxs@in.ot.com.au>
> 
> >        let rec x'() = 1 :: x()'
> >        let x = x'()
> >
> >Seems to work fine. Of course, this will loop forever in an eager
> >language: the result is an infinite list of 1s.
> 
> Looping forever is not quite the same as returning an infinite list
> of 1s, which is what the current implementation does for
>     let rec x = 1::x

I don't understand: to construct an infinite list of 1's would seem to
me to take infinite time in an eager language. So it comes to the same
thing, doesn't it?

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net