Skip to content

Instantly share code, notes, and snippets.

@edw
Created December 15, 2010 20:35
Show Gist options
  • Select an option

  • Save edw/742567 to your computer and use it in GitHub Desktop.

Select an option

Save edw/742567 to your computer and use it in GitHub Desktop.
;; THIS WORKS
(?- (lfs-textline "unified-traffic") (apply union (vals (traffic-plan "2010-12-12"))))
;; THIS DOESN'T
(let [all-queries (apply union (vals (traffic-plan "2010-12-12")))]
(?- (lfs-textline "unified-traffic-sorted")
(<- [?key ?visits ?transactions ?visit-revenue]
(all-queries ?key ?visits ?transactions ?visit-revenue)
(:sort ?visit-revenue :desc) (reverse :true))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment