package
0.0.0-20241125113622-89dfc66c781a
Repository: https://github.com/cloe-lang/cloe.git
Documentation: pkg.go.dev
# Functions
App creates a thunk applying a function to arguments.
AppWithInfo is the same as App except that it stores debug information in the thunk.
EvalBoolean evaluates a thunk which is expected to be a boolean value.
EvalDictionary evaluates a thunk which is expected to be a dictionary value.
EvalImpure evaluates an impure function call.
EvalList evaluates a thunk which is expected to be a list value.
EvalNumber evaluates a thunk which is expected to be a number value.
EvalPure evaluates a pure value.
EvalString evaluates a thunk which is expected to be a string value.
IsInt checks if a number value is an integer or not.
NewArguments creates a new Arguments.
NewBoolean converts a Go boolean value into BooleanType.
NewDictionary creates a dictionary from keys of values and their corresponding values of thunks.
NewEffectFunction creates a effect function which returns an effect value.
NewError creates an error value from its name and a formatted message.
NewKeywordArgument creates a KeywordArgument from a bound name and its value.
NewLazyFunction creates a function whose arguments are evaluated lazily.
NewList creates a list from its elements.
NewNumber creates a thunk containing a number value.
NewOptionalParameter creates an optional argument.
NewPositionalArgument creates a PositionalArgument.
NewPositionalArguments creates an Arguments which consists of unexpanded positional arguments.
NewRawFunction creates a function which takes arguments directly.
NewSignature defines a new Signature.
NewStrictFunction creates a function whose arguments are evaluated strictly.
NewString creates a string in the language from one in Go.
NotBooleanError creates an error value for an invalid value which is not a bool.
NotCollectionError creates an error value for an invalid value which is not a collection.
NotDictionaryError creates an error value for an invalid value which is not a dictionary.
NotEffectError creates an error value for a pure value which is expected to be an effect value.
NotFunctionError creates an error value for an invalid value which is not a function.
NotIntError creates an error value for a number value which is not an integer.
NotListError creates an error value for an invalid value which is not a list.
NotNumberError creates an error value for an invalid value which is not a number.
NotOrderedError creates an error value for an invalid value which is not ordered.
NotSequenceError creates an error value for an invalid value which is not a sequence.
NotStringError creates an error value for an invalid value which is not a string.
OutOfRangeError creates an error value for an out-of-range index to a list.
PApp is not PPap.
ReturnIfEmptyList returns true if a given list is empty, or false otherwise.
StrictDump is a variant of Dump which evaluates input strictly.
StrictPrepend is a strict version of the Prepend function.
TypeError creates an error value for an invalid type.
ValueError creates an error value for some invalid value detected at runtime.
# Variables
Add sums up numbers of arguments.
Assign inserts an element into a sequence.
Catch returns a dictionary containing a name and message of a catched error, or nil otherwise.
Compare compares 2 values and returns -1 when x < y, 0 when x = y, and 1 when x > y.
Delete deletes an element corresponding with a key.
Div divides the first argument by arguments of the second to the last one by one.
DummyError is an error used for tests.
Dump dumps a value into a string type value.
EmptyDictionary is a thunk of an empty dictionary.
EmptyList is a thunk of an empty list.
Equal checks if all arguments are equal or not.
Error creates an error value with an error name and message.
False is a false value.
First takes the first element in a list.
FloorDiv divides the first argument by arguments of the second to the last one by one.
If returns the second argument when the first one is true or the third one otherwise.
Include returns true if a collection includes an element, or false otherwise.
Index extracts an element corresponding with a key.
Insert inserts an element into a sequence.
IsOrdered checks if a value is ordered or not.
Merge merges more than 2 collections.
Mod calculate a remainder of a division of the first argument by the second one.
Mul multiplies numbers of arguments.
Nil is the evil or million-dollar mistake.
Partial creates a partially-applied function with arguments.
Pow calculates an exponentiation from a base of the first argument and an exponent of the second argument.
Prepend prepends multiple elements to a list of the last argument.
Pure extracts a result value in an effect value.
Rest returns a list which has the second to last elements of a given list.
Size returns a size of a collection.
Sub subtracts arguments of the second to the last from the first one as numbers.
ToList converts a collection into a list of its elements.
ToString converts some value into one of StringType.
True is a true value.
TypeOf returns a type name of an argument as a string.
# Structs
Arguments represents a structured set of arguments passed to a predicate.
DictionaryType represents a dictionary in the language.
ErrorType represents errors in the language and traces function calls for debugging.
KeyValue is a pair of a key and value inserted into dictionaries.
KeywordArgument represents a keyword argument passed to a function.
ListType represents a list of values in the language.
NilType represents a nil value.
OptionalParameter represents an optional argument defined in a function.
PositionalArgument represents a positional argument.
Signature represents function signature.
Thunk you all!.
# Interfaces
Value represents a value.
# Type aliases
BooleanType represents a boolean values in the language.
FunctionType represents a function.
NumberType represents a number in the language.
StringType represents a string in the language.