Re: variables in 'let rec'

From: Damien Doligez (Damien.Doligez@inria.fr)
Date: Tue Mar 28 2000 - 12:01:51 MET DST

  • Next message: David McClain: "Re: scientific computing with ocaml, gsl api"

    >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

    -- Damien



    This archive was generated by hypermail 2b29 : Tue Mar 28 2000 - 20:37:27 MET DST