Matthias Bisping f53f0fea29 [WIP] Either refactoring
Propagate error and metadata
2023-02-06 18:18:36 +01:00

20 lines
320 B
Python

from itertools import starmap
from funcy import iterate, first, curry, map
def until(cond, func, *args, **kwargs):
return first(filter(cond, iterate(func, *args, **kwargs)))
def lift(fn):
return curry(map)(fn)
def starlift(fn):
return curry(starmap)(fn)
def bottom(*args, **kwargs):
return None