A library that defines common SKI combinators from Combinatory Logic.
Project description
dovekie
dovekie
is a Python library that provides SKI combinators from Combinatory Logic and common unary and binary functions that are often used with these combinators. It is the spiritual equivalent of the:
- C++
blackbird
library - Rust
bluebird
library
How to install:
pip3 install dovekie
And how to use:
import operator as op
from itertools import accumulate
import dovekie as dk
def mco(xs: list[int]) -> int:
return max(accumulate(xs, dk.phi1(op.add, op.mul, dk.r)))
print(mco([1, 0, 1, 1, 1, 0, 0, 1, 1, 0])) # 3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dovekie-0.7.0.tar.gz
(2.8 kB
view hashes)