On Fri, Jun 5, 2009 at 8:08 PM, Chris Dean<[email protected]> wrote:
>
>> I've installed the package cl-iterate on my debian machine but now how
>> do I load it in my code?
>
> Not sure how the Debian packages work. It might be as simple as loading
> it with asdf.
I believe it hooks with REQUIRE (at least with sbcl). Try (require :iterate).
>> {(i,j) in NxN: i<=m and j<=n}
>
> Not much smarter than the loop version, but somthing like this is what I
> would do:
>
> (iter outer
> (for i :below 5)
> (iter (for j :below 6)
> (in outer (collect (list i j)))))
>
with loop:
(let ((m 5) (n 6))
(loop for i from 0 to m
append (loop for j from 0 to n
collect (list i j))))
cheers,
Alessio
_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners