Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 431 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 431 Bytes

FlyFloudC/miniKanren

miniKanren implemented in MoonBit.

It a Domain Specific Languages for logic programming.

http://minikanren.org/

Example

run_and_display(
  n=10,
  fn {
    v =>
      listo(v) & //
      membero(Int(1), v) &
      membero(Int(0), v)
  },
)

The result is

(1 0)
(0 1)
(1 0 _₀)
(1 _₀ 0)
(0 1 _₀)
(_₀ 1 0)
(1 0 _₀ _₁)
(0 _₀ 1)
(1 _₀ 0 _₁)
(1 _₀ _₁ 0)