The base library

Pacioli's primitives.

Synopsis

apply :: for_type s, t: (s -> t, s) -> t
equal :: for_type t: (t, t) -> Boole
error :: for_type t: (String) -> t
from_just :: for_type t: (Maybe(t)) -> t
identity :: for_type t: (t) -> t
is_nothing :: for_type t: (Maybe(t)) -> Boole
just :: for_type t: (t) -> Maybe(t)
not :: (Boole) -> Boole
not_equal :: for_type t: (t, t) -> Boole
nothing :: for_type t: () -> Maybe(t)
try_catch :: for_type t: (() -> t, (String) -> t) -> t
tuple :: for_type t: t -> t
type_of :: for_type t: (t) -> Identifier

Functions

apply

:: for_type s, t: (s -> t, s) -> t

Applies a function to a tuple of arguments.

Primitive function

equal

:: for_type t: (t, t) -> Boole

Are the given values equal?

Primitive function

error

:: for_type t: (String) -> t

Temporary stub for a proper error handling mechanism. Signals an error.

Primitive function

from_just

:: for_type t: (Maybe(t)) -> t

Temporary stub for a proper Maybe type.

Primitive function

identity

:: for_type t: (t) -> t

The identity function. Just returns its single argument.

Primitive function

is_nothing

:: for_type t: (Maybe(t)) -> Boole

Temporary stub for a proper Maybe type.

Primitive function

just

:: for_type t: (t) -> Maybe(t)

Temporary stub for a proper Maybe type.

Primitive function

not

:: (Boole) -> Boole

Logical complement

Primitive function

not_equal

:: for_type t: (t, t) -> Boole

Shorthand for not(equal(x, y)).

Primitive function

nothing

:: for_type t: () -> Maybe(t)

Temporary stub for a proper Maybe type.

Primitive function

try_catch

:: for_type t: (() -> t, (String) -> t) -> t

Temporary stub for a proper error handling mechanism.

Calls the function. If an error occurs, the handler function is called with the error message as argument.

Primitive function

tuple

:: for_type t: t -> t

Creates a tuple from the arguments.

Primitive function

type_of

:: for_type t: (t) -> Identifier

One of 'string', 'matrix' and 'generic'.

Primitive function

Version v0.6.0, 2026-03-05T15:49:19.061371593+01:00[Europe/Amsterdam]