Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created May 25, 2013 21:08
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 AdamSaleh/5650792 to your computer and use it in GitHub Desktop.
Save AdamSaleh/5650792 to your computer and use it in GitHub Desktop.
(defn initiate [past-knowledge]
(->>
(run* [M A B]
(!= M B)
(!= A B)
(membero [:me M] past-knowledge)
(membero [:id A] past-knowledge)
(membero [:id B] past-knowledge)
(membero [:pk B] past-knowledge))
(map (partial apply (fn [M A B]
[:initiate M :to B [:pcrypted [:pk B] [[:n A 1] [:id A]]]])))
(into (into #{} past-knowledge))
(into [])
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment