This is an example of for loop in Racket:
(define List '(1 2 3))
(for ((I List))
(displayln I)
)
In Scheme/Racket, the single-parenthesis pair wrapping about something is for evaluation. But the for loop form above takes the first param as ((I List)) which is wrapped in double-parenthesis pair.
That seems like:
- First, evaluate
(I List) - Then, evaluate
I List
What's the actual, theoretical meaning of this kind of evaluation, in double-parentheses?
(for ([x '(1 2 3)]) (displayln x))instead of(for ((x '(1 2 3))) (displayln x)). Same forcond,syntax-case, etc. - Sorawee Porncharoenwase[ ]is in general programming is a list of something, so i now prefer usingfor [(i List)] Forminstead :) - datdinhquoc