in reply to Re^3: If I was forced to use only one kind of loop for the rest of my days it would be ain thread If I was forced to use only one kind of loop for the rest of my days it would be a
(define a (list 1 2 3))
(set-cdr! a a)
(for-each (lambda (x) (display "hello world\n")) a)
Please read what I said in the parent node.
That's not a proper list, so r5rs doesn't guarantee this will
work. It does work with some scheme implementations, but
for-each: expects type <proper list> as 2nd argument, given: #0=(1 . #
+0#); other arguments were: #<procedure:STDIN::59>
Update: let me quote from the r5rs.
The original perl.com
Perl Monks Statistical Page
Results (40 votes). Check out past polls.