Dovekie
A library that defines common SKI combinators from Combinatory Logic.
Install / Use
/learn @codereport/DovekieREADME
<p align="center">dovekie</p>
<p align="center">
<a href="https://github.com/codereport/dovekie/issues" alt="contributions welcome">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" /></a>
<a href="https://lbesson.mit-license.org/" alt="MIT license">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" /></a>
<a href="https://www.python.org/">
<img src="https://img.shields.io/badge/Python-3-ff69b4.svg"/></a>
<a href="https://github.com/codereport?tab=followers" alt="GitHub followers">
<img src="https://img.shields.io/github/followers/codereport.svg?style=social&label=Follow" /></a>
<a href="https://GitHub.com/codereport/dovekie/stargazers/" alt="GitHub stars">
<img src="https://img.shields.io/github/stars/codereport/dovekie.svg?style=social&label=Star" /></a>
<a href="https://twitter.com/code_report" alt="Twitter">
<img src="https://img.shields.io/twitter/follow/code_report.svg?style=social&label=@code_report" /></a>
</p>
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++
blackbirdlibrary - Rust
bluebirdlibrary
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
