Search code examples
common-lispquicklisp

Using iterate after installing with Quicklisp


When I load the "iterate" package using Quicklisp ( (ql:quickload "iterate") ), it seems to load fine but none of the functions really work. When I enter (iterate:iter (for i from 0 to 10) (collect i)), I get an error saying "The variable I is unbound" and several style warnings saying that COLLECT and FOR are undefined functions and FROM is an undefined variable. The same thing happens if I try to use ITER or ITERATE instead of ITERATE:ITER. I'm using SBCL.


Solution

  • The "operators" of the clauses also reside in the iterate package:

    (iterate:iter (iterate:for i from 1 to 10) (iterate:collect i))
    

    Iterate is a package that is often convenient to use-package (or :use in the package definition).