Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jamii
Created November 26, 2012 21:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamii/4150891 to your computer and use it in GitHub Desktop.
Save jamii/4150891 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}))
; extensibility
(defmacro in [table pattern] ...) ; ==> AST (with mono/morph methods)
; deduct/induct do compile . chain . eval
@syntacticsugar
Copy link

hmmmmm

@syntacticsugar
Copy link

i cannot haz fractalz here :O :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment