Skip to content

FlyCloudC/miniKanren

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlyFloudC/miniKanren

The logic programming language, miniKanren.

More information:

Example

// find all lists whose 1 and 0 are both in it
let solutions : Iter[Val] = run(fn {
  v =>
    listo(v) & //
    membero(Int(1), v) &
    membero(Int(0), v)
})

solutions.take(10).each(println)

The output is

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

About

miniKanren implemented in MoonBit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published