[racket] Looping and let-values

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Oct 23 17:29:18 EDT 2011

Hi All,

I was having fun with sequece-generate* and wrote this
program as an example of its use.

(let-values ([(first next) (sequence-generate* '(a b c))])
  (let loop ([first first] [next next])
    (when first
      (display first) (newline)
      (call-with-values next loop))))

The   (let loop ([first first] [next next]) ... ) seems redundant.

Would it make sense for let-values to support the following?

(let-values loop ([(first next) (sequence-generate* '(a b c))])
  (when first
    (display first) (newline)
    (call-with-values next loop)))

-- 
Jens Axel Søgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111023/7e1bd14e/attachment.html>

Posted on the users mailing list.