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 details)
Built Distribution
File details
Details for the file dovekie-0.7.0.tar.gz
.
File metadata
- Download URL: dovekie-0.7.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f42e1f2e9a4ff4a17357a1173bb38cba31983d8a0867397aca38ac978c8d448 |
|
MD5 | b5862a85855562eb6b9521ded73e6106 |
|
BLAKE2b-256 | fa7b3cd3940eaa9ed88b6786f07dca1b2afe080c83659a19866ea1802a548634 |
File details
Details for the file dovekie-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: dovekie-0.7.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b26c6609f602da13c87caf06e1cda157d6b5c20eaa721e474ce280cea84066 |
|
MD5 | aaef51b15279559e44246c0b14e6218f |
|
BLAKE2b-256 | 3711fe640fa6726d1a2580b4cd3085e36730889eeb909e781695b3759b67b102 |