https://github.com/jiro4989/ski
Library for calculation SKI Combinator in pure Nim.
https://github.com/jiro4989/ski
combinator lib library nim ski
Last synced: 6 months ago
JSON representation
Library for calculation SKI Combinator in pure Nim.
- Host: GitHub
- URL: https://github.com/jiro4989/ski
- Owner: jiro4989
- Created: 2019-04-22T08:55:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-10T23:36:52.000Z (over 6 years ago)
- Last Synced: 2025-03-31T17:50:42.595Z (10 months ago)
- Topics: combinator, lib, library, nim, ski
- Language: Nim
- Homepage: https://jiro4989.github.io/ski/ski.html
- Size: 54.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
:toc: left
:sectnums:
= ski
Library for calculating https://en.wikipedia.org/wiki/SKI_combinator_calculus[SKI combinator].
image:https://travis-ci.org/jiro4989/ski.svg?branch=master["Build Status", link="https://travis-ci.org/jiro4989/ski"]
== Development
nim -v
Nim Compiler Version 0.19.4 [Linux: amd64]
Compiled at 2019-02-01
Copyright (c) 2006-2018 by Andreas Rumpf
git hash: b6d96cafc8bcad1f3d32f2910b25cd11a93f7751
active boot switches: -d:release
nimble -v
nimble v0.9.0 compiled at 2018-10-27 18:10:03
git hash: couldn't determine git hash
== Install
[source,bash]
nimble install ski
== Usage
=== Simple examples
[source,nim]
----
import ski
echo "Sxyz".calculate(combinators)
----
Output is `xz(yz)` .
=== Other examples
See `examples` directory.
Run example code.
==== Calc arguments example
Run
[source,bash]
cd examples/calc_args
nim c -r main.nim Sxyz
Output
Before : Sxyz
After : xz(yz)
==== Read file example
Run
[source,bash]
cd examples/read_file
nim c -r main.nim
Output
Sxyz
-> xz(yz)
SKxz
-> Kz(xz)
-> z
xz
-> Kxz
-> x
xz
-> SKxz
-> Kz(xz)
-> z
SKIKSIKIKISKIKIS
-> KK(IK)SIKIKISKIKIS
-> KSIKIKISKIKIS
-> SKIKISKIKIS
-> KK(IK)ISKIKIS
-> KISKIKIS
-> IKIKIS
-> KIKIS
-> IIS
-> IS
-> S
S
-> ()
-> K()
->
-> SK
== Document
* https://jiro4989.github.io/ski/ski.html
== Web application of SKI combinator calculator
I created simple SKI combinator calculator on web application.
https://jiro4989.github.io/ski
Javascript library of SKI combinator of the application is generated by this
module (`nimble js`).