Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Combinatory logic parsing and reduction gem
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
benchmark
lib
spec
.gitignore
.rvmrc
Gemfile
LICENSE.txt
README.md
Rakefile
master_forest.gemspec

README.md

Master Forest

This gem parses and reduces combinatory logic written in Lazy K syntax.

Usage

MasterForest::Term methods
initialize(string) argument is a Lazy K string
leaf? Is it a single letter like `s`, `k`, or `i`?
valid? Is it syntactically valid?
normal? Is it in normal form? (i.e. not further reducible)
to_s Serialize back to Lazy K
l Left applicand; nil if leaf
r Right applicand; nil if leaf
reduce Return single β reduction of term or term itself
fully_reduce(depth) Reduce depth times or until normal, default depth is ∞

Performance

This gem includes two implementations of the same functionality, MasterForest::Term and MasterForest::MemcacheTerm. If you run memcache then the latter will use it to memoize previous reductions. This goes much faster. You can test the speed by running benchmark/run.rb.

Something went wrong with that request. Please try again.