bburdette / schelme / Schelme.Prelude

Implementation of some fundamental functions, and a few values. Also some helpers for defining your own BuiltIn or SideEffector functions.


type alias BuiltInFn a =
Schelme.EvalStep.NameSpace a -> a -> List (Schelme.EvalStep.Term a) -> Result String ( Schelme.EvalStep.NameSpace a
, Schelme.EvalStep.Term a 
}

function type for evalArgsBuiltIn


type alias SideEffectorFn a =
Schelme.EvalStep.NameSpace a -> a -> List (Schelme.EvalStep.Term a) -> Result String ( Schelme.EvalStep.NameSpace a
, a
, Schelme.EvalStep.Term a 
}

function type to pass to evalArgsSideEffector

builtInFn : BuiltInFn a -> Schelme.EvalStep.BuiltIn a

make a BuiltIn function where arguments are NOT evaled before the BuiltInFn function is called. Useful for things like defn and comment.

evalArgsBuiltIn : BuiltInFn a -> Schelme.EvalStep.BuiltIn a

make a BuiltIn function where arguments are evaled before the BuiltInFn function is called.

evalArgsSideEffector : SideEffectorFn a -> Schelme.EvalStep.SideEffector a

make a SideEffector function where arguments are evaled before the SideEffectorFn function is called.

math : Dict String (Schelme.EvalStep.Term a)

a NameSpace of mathy schelme functions.

prelude : Dict String (Schelme.EvalStep.Term a)

a NameSpace of fundamental schelme functions.

mathGlossary : Schelme.EvalStep.TermGlossary

Glossary of math functions

preludeGlossary : Schelme.EvalStep.TermGlossary

Glossary of prelude terms