Skip to content

module internal.types.function

Source: stdlib/internal/types/function.codon


Function[T,TR] @extend Class is extended to add given methods

Magic methods

__new__(what: Ptr[byte]) @pure Function has no side effects and returns same value for same inputs @overload Function is overloaded @llvm Function is implemented with inline LLVM IR

ret ptr %what

__new__(what: Function[T, TR]) @overload Function is overloaded

__raw__(self) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

ret ptr %self

__repr__(self)

__call_internal__(self: Function[T, TR], args: T) @llvm Function is implemented with inline LLVM IR

noop  # compiler will populate this one

__call__(self, *args)


Callable[T,TR] @extend Class is extended to add given methods

Magic methods

__new__(fn: Function[Ptr[byte], T, TR], data: Ptr[byte])

__new__(fn: Function[Ptr[byte], T, TR], data: Partial[M, PT, K, F], T: type, TR: type, M: Literal[str], PT: type, F: type, K: type) @overload Function is overloaded

__new__(fn: Function[Ptr[byte], T, TR], data: Function[T, TR]) @overload Function is overloaded

__new__(fn: Function[T, TR]) @overload Function is overloaded

__call__(self, *args)


Partial[M,T,K,F] @extend Class is extended to add given methods

Properties

__fn_name__ @property Method is a class property

Magic methods

__repr__(self)

__call__(self, *args, **kwargs)

__fn_name__(self) @property Method is a class property

__raw__(self)