![](https://secure.gravatar.com/avatar/4aed3eb291895487e95cc2850cb92391.jpg?s=120&d=mm&r=g)
2010/4/11 Eivind Midtgård <eivind@autosim.no>:
(iterate (for elt in list-of-lists) (finding elt maximizing (length elt)))
whereas the example of how it can be done in loop is long and contorted. But loop can do
(loop for elt in list-of-lists maximizing (length elt))
Your loop example returns the length of the longest sublist. The Iterate example yields the longest sublist itself. I am afraid the loop equivalent really has to be this contorted.
The example in 3.2 Named blocks may be better as a selling point:
(iter outer (for i below (array-dimension ar 0)) (iter (for j below (array-dimension ar 1)) (in outer (collect (aref ar i j)))))
showing that the outer loop can easily collect data produced in the inner loop.
This one is good. I've replaced the (IMO, not very strong) generators example with it. Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs