Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (17 sloc) 0.279 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
;-----
(use '[clojure.core.logic])

(run* [x] (conso 1 [2 3] x))
;= ((1 2 3))
(run* [x]
  (fresh [_]
    (conso x _ [1 2 3])))
;= (1)
(run* [x]
  (fresh [_]
    (conso _ 3 [1 2 3])))
;= ((2 3))
(run* [q]
  (fresh [x y]
    (conso x y [1 2 3])
    (== q [x y])))
;= ((1 (2 3)))


Something went wrong with that request. Please try again.