Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: Damien Doligez <Damien.Doligez@i...>
Subject: Re: variables in 'let rec'
>From: Max Skaller <>

>        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

-- Damien