Skip to content

Instantly share code, notes, and snippets.

@gfredericks
Created August 29, 2012 20:57
Show Gist options
  • Select an option

  • Save gfredericks/3518832 to your computer and use it in GitHub Desktop.

Select an option

Save gfredericks/3518832 to your computer and use it in GitHub Desktop.

Revisions

  1. gfredericks created this gist Aug 29, 2012.
    9 changes: 9 additions & 0 deletions 4bo.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    (defn loud-numbers
    []
    (take 10 (iterate (fn [x] (println "I'm adding to " x) (inc x)) 0)))

    (defn less-lazy
    [coll]
    (lazy-seq
    (future (second coll))
    (cons (first coll) (less-lazy (rest coll)))))