WARNING: TOTALLY UNIMPORTANT QUESTION AHEAD.

I want to enumerate the first 10 values returned by a thunk. I came up with 

(define thunk (lambda () 14))

(for/list ([i 10][e (in-producer thunk #f)]) e)

… but I feel like there must be some way to simply write (stream-take thunk 
10). Am I missing something obvious?


John

Attachment: smime.p7s
Description: S/MIME cryptographic signature

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to