This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-11
Channels
- # announcements (1)
- # aws (5)
- # beginners (8)
- # biff (7)
- # calva (32)
- # cider (26)
- # clj-kondo (6)
- # clojure (100)
- # clojure-europe (6)
- # clojure-greece (1)
- # clojurescript (15)
- # core-logic (3)
- # fulcro (2)
- # honeysql (4)
- # hoplon (39)
- # hyperfiddle (11)
- # lsp (12)
- # other-languages (2)
- # podcasts-discuss (1)
- # squint (30)
I'm new to core.logic, and I'm working through the http://webyrd.net/alphamk/alphamk.pdf with core.logic.nominal. On page 4, when getting into details about var swapping, an example equivalent to this is given:
(l/run* [q]
(n/fresh [a b]
(l/fresh [x y]
(l/== (n/tie a (n/tie a x)) (n/tie a (n/tie b y)))
(l/== `(~x ~y) q))))
With the comment that "the unifier cannot apply the swap (a b) to either x or y, since they are both unbound...nominal unification solves this problem by introducing the notion of a suspension". In c.l.nominal, they var swap / unify the same as if the expressions were identical, neither variable being instantiated.