Skip to content

Instantly share code, notes, and snippets.

@zk
zk / core.clj
Created November 22, 2011 05:16 — forked from dakrone/core.clj
Collapse page results into a lazy-seq that only fetches when needed
(ns lazywindow.core)
(def page-size 5)
(defn get-page
"Retrieve a vector of results for a page"
[page-num]
(Thread/sleep 50)
;; this is used to simulate actually getting a page of results
(cond