Skip to content

Make a Pipeable Function Jitted¤

stamox.core.jit.pipe_jit(func: Callable[..., ~T] = None, *, donate: str = 'none', name: str = None) -> Callable[..., ~T] ¤

Creates a pipeable jitted functional from a given function.

Parameters:

Name Type Description Default
func Callable[..., ~T]

The function to create the functional from.

None
donate str

Optional donation string.

'none'
name str

Optional name for the functional.

None

Returns:

Type Description
Callable[..., ~T]

A callable that creates a functional from the given function.

Examples:

>>> from stamox import pipe_jit
>>> f = lambda x: x + 1
>>> f = pipe_jit(f)
>>> g = f >> f >> f
>>> g(1)
4

stamox.core.jit.partial_pipe_jit(func: Callable[..., ~T] = None, *, name: str = None) -> Callable[..., ~T] ¤

Creates a partial pipeable jitted functional from a given function.

Parameters:

Name Type Description Default
func Callable[P, T]

description

None
name str

description. Defaults to None.

None

Returns:

Type Description
Callable[..., ~T]

a partial pipeable jitted functional from a given function.

Examples:

>>> from stamox.core import partial_pipe_jit
>>> f = lambda x, y: x + y
>>> f = partial_pipe_jit(f)
>>> g = f(y=1) >> f(y=2) >> f(y=3)
>>> g(1)
7