Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

A miniKanren in Groovy.

Build Status

Basically a port of https://github.com/spariev/mini_kanren to Groovy.

Currently experimental, and could do with some help to make it nicer/faster/more useful.

For a simple example, say you have 2 lists, and you need to find the common members, you could do:

import com.bloidonia.logic.Logic

new Logic().with {
    
    // Create a fresh logic variable `q`
    fresh { q ->
    
        // Find all values for q which are in [ 1,2,3 ] and [ 2,3,4 ]
        assert run( q, membero( q, buildList( [ 1, 2, 3 ] ) ),
                       membero( q, buildList( [ 2, 3, 4 ] ) ) ) == [ 2, 3 ]
    }
}

About

No description, website, or topics provided.

Resources

License

Releases

No releases published
You can’t perform that action at this time.