An open API service indexing awesome lists of open source software.

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.

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)


image-removebg-preview

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
```