Multiplies two numbers.
Association list of symbol names to doc strings.
List of scripts that have been loaded.
The seed from which the next random value is derived.
Stack of tc
+
/-
values that have been pushed by push-tc
.
Adds two numbers.
Subtracts second number from first.
Divides first number by second.
Returns true if first number is less than the second.
Unconditional parser that always succeeds, consuming all of the input, yielding remaining input.
Gets element in vector at given 1-based index.
Returns true if first number is less than or equal to the second.
Empty parser that always succeeds, consuming none of the input, yielding empty list of results.
Returns true if two values are equal, which must be the same static type.
Returns true if two values are equal, which can be different static types.
Returns true if first number is greater than the second.
Returns true if first number is greater than or equal to the second.
Macro that allows declaration of dict literals. Requires even number of args, alternating key-value.
Returns the absolute value of given number.
Returns true if argument is an absvector.
Prepends value to head of list if not already in list.
Returns true if predicate returns true for all elements in list.
Returns true if both arguments are true; doesn't evaluate second argument if first is false.
Returns true if predicate returns true for any elements in list.
Concat's two lists into one.
Applies function to list of arguments.
Returns arity of given function name or -1 if there is not such function.
Returns pair in association list with given key value.
Collects values in binary tree into a list in given traversal.
Returns true if argument is a boolean.
Returns true if symbol is bound to a value.
Bubble-sorts a slice of a vector.
Returns list with all the same elements but the first.
Returns list with all the same elements but the last.
Changes working directory.
Rounds up to nearest integer.
Closes stream, returns empty list.
Concat's two strings into one.
Takes yacc grammar and
Returns new version of function with inverse result of given function.
Returns true if argument is a cons.
Returns a function that ignores its argument and always returns the given value.
Returns true if substring is contained by string.
Returns true if any elements in list are equal to given key value.
Builds list of every combination of values in two lists as tuples.
Builds list of every combination of values in two lists using given function.
Converts function that takes tuple to function that takes arguments individually.
Subtracts 1 from number.
Declares a new generic method with the given type.
Defines a specific implementation of kind-of
with the given predicate and symbol.
Adds implementation for multi-method for kind.
Declares a new multi-method with given type.
Declares a case-specific implementation of a generic method. New implementations supercede old ones.
Erases given function.
Returns list of values that are in first list but not second.
Returns copy of list with duplicates removed.
Returns result of last expression, used to group side-effecting expressions.
Returns doc string for symbol, or 'n/a' if there isn't one.
Returns all but the first n elements in list.
Returns list remaining elements after dropping consecutive leading elements so long as given predicate returns true for them.
For each item in list, applies function.
Returns true if value is in list.
Returns true if argument is an empty list.
Takes + or - to turn default type system on or off.
Determines if error has a message like the given string.
Returns exception's message.
Converts value to string and returns list of unit strings.
Returns list of symbols exported from package.
Returns the failure symbol.
Returns the fail symbol if the function returns true for the given symbol, returns symbol argument otherwise.
Returns true if argument is the fail symbol.
Returns copy of list with only elements for which predicate returns true.
Returns the first element of a list, error if emtpy.
Repeatedly applies function until it returns the same value it was given.
Applies function to each value in list and concat's results into one long list.
Converts a list of lists into one long list.
Rounds down to nearest integer.
Combines values in list in given order.
Combines values in list from left to right using given function. Tail recursive.
Combines values in list from right to left using given function. Not tail recursive.
Applies function to each item in list.
Returns a function that will evaluate expression.
Returns the first value in a 2-tuple.
Returns function associated with symbol.
Returns true if argument is a function.
Returns unique variable based on given symbol.
Returns the time, unix timestamp when passed 'unix, time since start when passed 'run.
Computes hash for given value, starting from given seed.
Returns first unit string in string.
Returns first value in vector.
Returns first value in list.
Gets the value of a binary tree node.
Returns the same value given.
Evaluates condition, evaluates and returns second expression if true, third expression if false.
Returns name of language implementation/platform.
Makes datatypes visible to the type checker.
Makes all datatypes except the given visible to the type checker.
Reads file at In path and overrites file at Out path with lines properly indented.
Finds 0-based index of first occurrence of substring in string, -1 if not found.
Returns the number of type checking inferences that have been performed so far.
Returns human readable string with type, doc string, source for symbol.
Checks if number is an integer.
Returns true if value is a number and an integer.
Gets the symbols internal to a package.
Inserts value between each value in list.
Returns list containing only elements contained in both lists.
Returns expression that contains the call to (it).
Joins lines with either lf
or crlf
endings.
Concatenates a list of strings interspersing a separator.
Terminates YACC parsing.
Returns a symbol identifying the type family of given value.
Returns name of language this port is implemented in.
Returns the last element of a list, error if empty.
Gets the left branch of a binary tree node.
Returns length of list.
Returns length of vector.
Makes a new vector out of a list.
Reads and evaluates code at path relative to *home-directory*
.
Returns true if given module has been loaded.
Returns copy of string with all characters converted to lower-case.
Returns lower-case of given unit string.
Applies function to each element in list, returning list of results.
Uses given function to transform both values in a 2-tuple.
Uses given function to transform the first value in a 2-tuple.
Uses given function to transform the second value in a 2-tuple.
Applies function to each element in list, concat'ing results into one long list.
Returns maximum number in list.
Returns value in list for which given function returns maximum value.
Returns maximum value in list comparing using given function.
Sets the maximum number of inferences the type checker will attempt.
Maybe.
Apply function if something.
Maybe?
Memoizes a 0-parameter continuation.
Performs modulus operation.
Returns unit string for character code point.
Returns negation of given number.
Determines if number is negative.
Returns the next random value based on the current value of *seed*
.
Returns the next random value within the given range.
Returns the next random boolean based on the current value of *seed*
.
Writes a number of new lines to the standard output stream.
Creates a binary tree node from a value, left branch and right branch.
Maybe nothing.
Maybe nothing?
Takes true/false and returns false/true.
Equivalent to (not (= X Y)).
Equivalent to (not (== X Y)).
Returns the element in a list at given 1-based index.
Returns true if argument is a number.
Returns the number of times a value appears in a tree.
Turns prolog occurs checking on/off with +/-.
Turns Shen -> KL optimisation on/off with +/-.
Returns true if either argument is true; doesn't evaluate second argument if first is true.
Get the something or default value.
Returns name of current running operating system.
Returns true if argument is the name of a defined package.
Splits list into list of sublists, each no longer than given length.
Generic peek method. Returns next item from sequence without modifiying container. Raises error on empty.
Generic pop method. Destructively removes next item from sequence. Raises error on empty.
Pops +
/-
off of *tc-stack*
and set tc
to that mode.
Returns the version of this port of Shen.
Returns the name(s) of the author(s) of this port of Shen.
Returns the unit string at the given 0-based index in a string.
Determines if number is positive.
Writes string to output stream.
Hides datatypes from the type checker.
Hides all datatypes except the given from the type checker.
Checks if second argument starts with the first.
Adds value to beginning of list.
Writes value to standard output stream.
Prepares verion of function given by name to include performance profiling logging.
Gets the run time of running the given function.
Used by parser to identify code that should not be interpreted. Passes through argument.
Returns the compiled KLambda code for the given function.
Generic push method. Adds item to mutable container.
Pushes current +
/-
onto *tc-stack*
and sets tc
to given mode.
Creates a new queue.
Returns true if given queue is empty.
Returns the head value of mutable queue, raises error if empty.
Pops value off of mutable queue, raises error if empty.
Pushes a value onto queue, returns queue.
Returns size of queue.
Returns true if argument is a queue.
Returns list of numbers from 1 up to and including the given number.
Reads and parses an element of Shen code from given input stream.
Reads single byte from given input stream.
Reads all elements of Shen code from given file relative to *home-directory*
.
Reads contents of file relative to *home-directory*
as list of bytes.
Reads contents of file relative to *home-directory*
as string.
Reads all elements of Shen code from given string.
Returns version of language implementation/platform.
Loads script whether it has been loaded or not.
Loads script with (tc +)
whether it has been loaded or not.
Loads script with (tc -)
whether it has been loaded or not.
Removes all occurances of value from list.
Builds list by repeating the same value N times.
Builds list by invoking the same function N times.
Loads script if it has not been loaded.
Loads script with (tc +)
if it has not been loaded.
Loads script with (tc -)
if it has not been loaded.
Returns new list with same elements in reverse order.
Returns string with same characters in reverse order.
Gets the right branch of a binary tree node.
Searches for functions with doc strings similar to search string.
Splits list into two separate lists based on whether predicate returns true or false.
Sets doc string for symbol.
Sets global symbol to value only if global symbol is not already bound.
Randomizes elements in cons list, returning a new list.
Randomizes elements in vector in place.
Returns -1 for negative number, 1 for positive, 0 for 0.
Raises exception with given error message.
Generic size method.
Returns true if argument is the skip symbol.
Returns the first value in a 2-tuple.
Maybe something.
Maybe something?
Sorts the elements of a list and returns a new list in sorted order.
Sorts the elements of a vector in place.
Returns a string of N
spaces
Sets function as having specialised type.
Splits list into two sublists at given index.
Splits a string into a list of lines, consider LF and CRLF line endings.
Splits a string into a list of substrings on separator. Retains empty strings.
Turns the type checker debugger on/off with +/-.
Creates a new mutable stack.
Returns true if given stack is empty.
Returns the top value of mutable stack, raises error if empty.
Pops value off of mutable stack, raises error if empty.
Pushes a value onto mutable stack, returns stack.
Returns size of mutable stack.
Returns true if argument is a mutable stack.
Turns debugging on/off with +/-.
Returns standard error stream.
Returns standard input stream.
Returns standard output stream.
Converts value to a string.
Converts a string to a list of code points.
Converts unit string to character code point.
Returns a symbol named after string.
Returns -1 if first string comes first, 1 if it comes later, 0 if they are equal.
Returns length of string.
Adds string length onto given amount and returns.
Returns true if argument is a string.
Extracts between starting and ending 0-based indicies.
Extracts substring from starting 0-based index.
Extracts substring up to 0-based index.
Adds value to end of list.
Checks if second argument ends with the first.
Adds all numbers in list, 0 for empty list.
Returns true if argument is a symbol.
Declares function as a system function that cannot be overwritten.
Returns list containing all but the first element of a list.
Returns first n elements in list.
Copies first n elements from list onto other list.
Returns list of consecutive leading elements so long as given predicate returns true for them.
Copies elements from list onto other list so long as given predicate returns true for them.
Turns type checking on/off with +/-.
Returns true if type checking is enabled, false otherwise.
Calls a zero-argument function, as created by freeze.
Returns string containing all but the first unit string of string.
Returns a vector containing all but the first element of input vector.
Sets function as being tracked by debugger.
Evaluates first expression and if exception is raised, evaluates second argument and applies it to exception.
Folds values in binary tree in given traversal.
Folds values in binary tree in an in-order traversal.
Folds values in binary tree in a level-order traversal.
Folds values in binary tree in an out-order traversal.
Folds values in binary tree in a post-order traversal.
Folds values in binary tree in a pre-order traversal.
Removes whitespace characters from beginning and end of string.
Removes whitespace characters from end of string.
Removes whitespace characters from beginning of string.
Returns true if argument is a tuple.
Returns type-signature of function or (fail).
Converts function that takes arguments individually to function that takes tuple.
Unregisters macro by name.
Builds list by repeatedly calling the given function until it returns an empty list.
Repeatedly calls given function until it returns empty list, prepending results onto given list.
Returns list that contains all the elements in both given lists, excluding duplicates.
Restores original version of function before it was profiled.
Resets type specialisation of function.
Resets function as not being tracked by debugger.
Get the something. Error if nothing.
Returns copy of string with all characters converted to upper-case.
Returns upper-case of given unit string.
Returns true if symbol could be a variable.
Creates new vector of given length.
Sets element in vector at given 1-based index.
Makes a new list out of a vector.
Swaps two elements in given vector at following indicies.
Transforms value at index by given function.
Returns true if given value is a vector (not just an absvector).
Returns version of Shen.
Returns an empty list as a unit value.
Returns true if string is all whitespace.
Writes a byte to a stream, returning the byte.
Writes string as ASCII sequence to file at given path.
Converts value to string and writes to file.
Shows yes or no prompt with given message and returns true if user answers yes.
Lines up two lists and combines each pair of values into tuple in resulting list.
Lines up two lists and combines each pair of values into value in resulting list using given function.