Skip to content

Instantly share code, notes, and snippets.

@zane
Created September 12, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zane/3709163 to your computer and use it in GitHub Desktop.
Save zane/3709163 to your computer and use it in GitHub Desktop.
(let [data [[:a :x 1]
[:b :x 2]
[:c :y 3]]
subquery (<- [?set ?num1]
(data ?label ?set ?num)
(:sort ?num)
(:reverse true)
(c/limit [1] :< ?num :> ?num1))]
(?<- (stdout)
[?label ?set ?num]
(data ?label ?set _)
(subquery ?set ?num)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment