Last active
December 17, 2015 05:49
-
-
Save mpenet/5560708 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; example of query that takes results by pairs, | |
;; and uses the last value of x to create the new chunks, incrementing its value. | |
(lazy-query (select :items | |
(limit 2) | |
(where {:x 1})) | |
(fn [query coll] | |
(merge query (where {:x (-> coll last :x inc)})))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment