|
|
|
|
|
by lispm
2795 days ago
|
|
(loop for i from 10 upto 20
do (print i))
what does it do? Maybe it prints the numbers from 10 upto 20? (loop for element across vector
sum element)
Hmm, what does it do? Maybe it sums all the elements of a vector?Ada: for E of The_List loop
if Is_Prime(E.P) then
E.Q := E.Q + X;
end if;
end loop;
Lisp: (loop for e in the-list
if (primep (p e))
do (incf (e q) x))
Totally weird and bizarre how it looks similar.Even stranger: (
loop for e in the-list
if (primep (p e))
do (incf (e q) x)
; end if
; end loop
)
|
|
And that's in Scheme, so it doesn't look like someone dropped a chunk of Algol in your coffee.