(loop for i in *random*
counting (evenp i) into evens
counting (oddp i) into odds
summing i into total
maximizing i into max
minimizing i into min
finally (return (list min max total evens odds)))
Or, more realistic example from a project I'm currently working on:
with entities = (%get-entities-for-rendering x (+ x w) y (+ y h))
for (ent-x ent-y ent-fg ent-char) in entities
for realx = (+ cx (- ent-x x))
for realy = (+ cy (- ent-y y))
(tcod:console-set-char-foreground console realx realy ent-fg)
Common Lisp's loop can do crazy amount of things in a compact form, though there are things that are missing, and the whole thing isn't extensible (though there are library-provided alternatives like iterate that are better in this aspect).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.