https://github.com/codereport/dovekie
A library that defines common SKI combinators from Combinatory Logic.
https://github.com/codereport/dovekie
Last synced: 4 months ago
JSON representation
A library that defines common SKI combinators from Combinatory Logic.
- Host: GitHub
- URL: https://github.com/codereport/dovekie
- Owner: codereport
- License: mit
- Created: 2024-04-01T22:22:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T20:12:25.000Z (about 2 years ago)
- Last Synced: 2025-10-27T08:25:28.564Z (8 months ago)
- Language: Python
- Homepage: https://pypi.org/project/dovekie
- Size: 17.6 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
`dovekie`
`dovekie` is a [Python](https://www.python.org/) library that provides SKI combinators from [Combinatory Logic](https://combinatorylogic.com/) and common unary and binary functions that are often used with these combinators. It is the spiritual equivalent of the:
* C++ [`blackbird` library](https://github.com/codereport/blackbird)
* Rust [`bluebird` library](https://github.com/codereport/bluebird)
How to install:
```bash
pip3 install dovekie
```
And how to use:
```py
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
```