In my Lisp course I've just been introduced to the concept of 'lazy
evaluations' using closures... I got pretty used to something like that
when I learned programming in SML, but I've trouble doing it in Lisp...
Maybe if I saw a simple example, I'd see how it works? For example, if I
want a infinite list of all natural numbers: it starts as
(1 . #<Interpreted-Function (LAMBDA <something>...)
and when I apply my 'lazy cdr' function, I get
(2 . #<Interpreted-Function (LAMBDA <something>...)
and so on... I would have no problems writing somethig like that in ML, but
in Lisp, I fail miserably at even such a simple task...
Can you help me?
--
----
-----------------------------------------------------------------------
[Insert joke here.] ----
--
····@studcs.uni-sb.de (Andreas Baus)
Andreas Baus (····@cip76.cscip.uni-sb.de) wrote:
: In my Lisp course I've just been introduced to the concept of 'lazy
: evaluations' using closures... I got pretty used to something like that
: when I learned programming in SML, but I've trouble doing it in Lisp...
: Maybe if I saw a simple example, I'd see how it works? For example, if I
: want a infinite list of all natural numbers: it starts as
: (1 . #<Interpreted-Function (LAMBDA <something>...)
: and when I apply my 'lazy cdr' function, I get
: (2 . #<Interpreted-Function (LAMBDA <something>...)
: and so on... I would have no problems writing somethig like that in ML, but
: in Lisp, I fail miserably at even such a simple task...
: Can you help me?
If you show us what you are doing, we may point to you what you are
doing wrong.
It's not different from SML.
Cheers.