Skip to content

Instantly share code, notes, and snippets.

@swannodette
Forked from jamii/gist:4150891
Created November 26, 2012 22:13
Show Gist options
  • Save swannodette/4151001 to your computer and use it in GitHub Desktop.
Save swannodette/4151001 to your computer and use it in GitHub Desktop.
; 'in returns seq
; 'lte returns (reduce join seq)
; 'in? filters by pattern
; 'lte? tests value by lattice ordering
; 'is? matches by pattern (non-monotonic)
; path membership
(d/deduct in :path [a c]
in? :edge [?a ?b]
in? :path [?b ?c])
; voting
(d/deduct lte :finished true
is? :votes #(> (count %) threshold))
; nosql
(d/deduct in :store [key (->Causal vc val)]
in? :puts {:key ?key :vc ?vc :val ?val})
(d/deduct lte :vc vc
in? :puts {:vc ?vc})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment