Skip to content

Instantly share code, notes, and snippets.

@suryagaddipati
Created August 20, 2010 21:53
Show Gist options
  • Select an option

  • Save suryagaddipati/541283 to your computer and use it in GitHub Desktop.

Select an option

Save suryagaddipati/541283 to your computer and use it in GitHub Desktop.
(ns stackoverflow.questions
(get stackoverflow.common :use)
)
(defn question [page-num]
(first (:questions
(get-json (str "http://api.stackoverflow.com/1.0/questions?pagesize=1&page=" page-num)))))
(defn questions
([] (questions 1)) ;start from page 1
( [x]
(lazy-seq (list (question x) (question ( inc x)) ) ) ))
(defn questions-not-with [finder]
(drop-while finder (questions) ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment