I hereby claim:
- I am leeeet on github.
- I am leeeet (https://keybase.io/leeeet) on keybase.
- I have a public key ASDYtFndK00PVisAWXuWqSJ5PFdRdEhVGog6z-RPDfQ15wo
To claim this, I am signing this object:
from sys import setrecursionlimit | |
setrecursionlimit(10000) | |
lift2 = lambda identity: lambda apply: lambda function: lambda first: apply(apply(identity(function))(first)) | |
bind = lambda map: lambda join: lambda value: lambda function: join(map(function)(value)) |
I hereby claim:
To claim this, I am signing this object:
from __future__ import annotations | |
import builtins | |
from typing import Protocol | |
class Ty[T]: | |
pass | |
from collections.abc import Callable | |
from dataclasses import dataclass | |
from typing import Protocol, Self | |
def curry[First, *Rest, Result]( | |
function: Callable[[First, *Rest], Result], | |
) -> Callable[[*Rest], Callable[[First], Result]]: | |
return lambda *rest: lambda first: function(first, *rest) |
import asyncio | |
from collections.abc import Callable, Coroutine | |
from dataclasses import dataclass | |
from typing import Any | |
def curry[First, *Rest, Result](function: Callable[[First, *Rest], Result]) -> Callable[[*Rest], Callable[[First], Result]]: | |
return lambda *rest: lambda first: function(first, *rest) |
import sys | |
from collections.abc import Callable, Iterator | |
from functools import cache | |
type Lazy[T] = Callable[[], T] | |
type Stream[T] = Lazy[tuple[T, Stream[T]]] |
import sys | |
from collections.abc import Callable, Iterator | |
from functools import cache | |
type Lazy[T] = Callable[[], T] | |
def run_lazy[T](lazy: Lazy[T]) -> T: |
from __future__ import annotations | |
from collections.abc import Callable, Iterator | |
from typing import Protocol, cast | |
type Lazy[Value] = Callable[[], Value] | |
def lazify[Value](value: Value) -> Lazy[Value]: |
from collections.abc import Callable | |
from dataclasses import dataclass | |
from typing import Concatenate, Final | |
@dataclass(frozen=True) | |
class Partial1[First, **P, Result]: | |
function: Callable[Concatenate[First, P], Result] | |
first: First |
from asyncio import run | |
from collections.abc import Coroutine | |
from dataclasses import dataclass | |
from typing import Any, Protocol | |
class Callable[*Arguments, Result](Protocol): | |
def __call__(self, *args: *Arguments) -> Result: | |
... |