Dear all,

I am happy to announce the public availability of clj-iter, an Iterate-
like iteration macro. It is free (available under the terms of MIT
license) and can be found on GitHub: http://github.com/nathell/clj-iter

The design goal was to keep it as simple as possible, and make it
blend well with the rest of Clojure.  In
contrast to cl-loop, which uses mutable bindings, clj-iter has a
functional flavour, and macroexpands to the kind of code you would
write manually using loop/recur.  It is also very simple, having a
fraction of Iterate's functionality, but I hope even the little there
is will be sufficient in many cases.

To avoid citing the entire README blurb, I'll just give you some
examples:

    (iter (for x in [31 41 59 26])
          (for y from 1)
          (collect (+ x y)))
    ==> (32 43 62 30)

    (iter (for s on [1 2 3 4 5])
        (for q initially () then (cons (first s) q))
        (collect (cons (first s) (concat (take 2 (rest s)) (take 2
q)))))
    ==> ((1 2 3) (2 3 4 1) (3 4 5 2 1) (4 5 3 2) (5 4 3))

Please let me know whether it is of any use to you.  Feedback, and
especially patches, are more than welcome.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to