On Tue, Dec 21, 2010 at 12:20 PM, nicolas.o...@gmail.com <
nicolas.o...@gmail.com> wrote:

> I have an example to clarify what I understood of your idea:
>
> (declare odd)
>
> (defn even [x]
>        (if (zero? x)
>          [true]
>          (lazy-seq nil (odd (dec x)))))
>
> (defn odd [ x]
>        (if (zero? x)
>          [false]
>          (lazy-seq nil (even (dec x)))))
>
> (defn get-value [l]
>        (if (nil? (first l)) (recur (next l)) (first l)))
>
> (get-value (even 15000000))
>
> Nicolas.


Yup :D

-- 
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