Skip to content

Explang/Alg Built-in Functions by Name

@ A B C D E F G H I J L M N O P Q R S T U V W _ % * + - . / < = >

@

@_>

@_>(args ...)

Threading form on &PIPE or first argument

builtin form in package base.control defined at class io.opsit.explang.Compiler$TH_PIPE

A

AND

Logical AND operation.

AND(#= &LAZY =# forms...)

Operator: and
   x and b

Function `AND` lazily evaluates each argument expression, one at a time from
left to right. As soon as any of them evaluates to implicit logical `false`,
`AND` returns this value without evaluating the remaining expressions (if any).
If all evaluate to true values, `AND` returns the result produced by
evaluating the last expression. If no arguments supplied, `AND` returns `true`.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$AND

APPEND

Concatenate sequences (non-destructive).

APPEND(sequences...)

`append` returns a new sequence that is the concatenation of the 
elements of the arguments. All the arguments remain unchanged. The 
resulting sequence is of the same type as the first argument. In no 
arguments were given, an empty list is returned. If target sequence is
an array, necessary coercions according to the type of array elements
will be performed automatically.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$APPEND

APPEND!

Concatenate sequences (destructive).

APPEND!(sequences...)

Adds to the first given sequence (target sequence) all the elements of all of the following sequences and return the target sequence. If no sequences were given an empty list will be returned. Target sequence must be extendable, that means that objects like Arrays or String cannot be target of this operation

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NAPPEND

APPLY

Call function f with arguments expanding the last one.

APPLY(f, #= &PIPE =# arguments...)

`apply` calls function `f` with given arguments. If the last of the arguments
is a list, its contents will be appended to the list of arguments of `f`.

builtin function in package base.funcs defined at class io.opsit.explang.Funcs$APPLY

AREF

Get Array element value.

AREF(array, index)

Return array element at specified index. Throws ArrayOutOfBoundsException if index is invalid

builtin function in package base.seq defined at class io.opsit.explang.Funcs$AREF

ARGV

Access command line arguments.

ARGV(n:=NIL)

When n is provided return nth argument as String, when not -- return list of command line arguments. If n is out of range return NIL.

builtin function in package runtime defined at class io.opsit.explang.Funcs$ARGV

ASET

Set value of element at index to object.

ASET(obj, key, object)

Set indexed sequence (array, list, character sequence) element value.
May fail with index out of bound exception.

If target ibject is a Java array and object type does not match type of the
array this function will attempt to perform necessary coercion operations. 
The coercions  work in the same way as INT, FLOAT, STRING and rest of the 
built-in coercion functions. 

The function returns new sequence with the requested change, the original
object is not modified

builtin function in package base.seq defined at class io.opsit.explang.Funcs$ASET

ASET!

Set value of element at index to object.

ASET!(obj, key, object)

Set indexed sequence (array, list, character sequence) element value.

If target ibject is a Java array and object type does not match array type
this function will attempt to perform necessary coercion operations. 
The coercions  work in the same way as INT, FLOAT, STRING and rest of the
built-in coercion functions. May fail with index out of bound exception.

The function returns previous value of the element.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NASET

ASSOC

Associates values with keys in an map structure.

ASSOC(map, key, val, kvpairs...)

Return new instance of the structure, the original is left unchanged.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$ASSOC

ASSOC!

Associates values with keys in an map structure.

ASSOC!(map, key, val, kvpairs...)

Modifies the object and returns it as the result.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NASSOC

ASSOCIATIVEP

ASSOCIATIVEP(object)

Check if an object is an associative collection.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$ASSOCIATIVEP

AS_>

AS_>(args ...)

Threading form on named argument

builtin form in package base.control defined at class io.opsit.explang.Compiler$TH_AS

B

BACKTRACE

Return callstack backtrace.

BACKTRACE(vars:=NIL)

Returns string representation of current stack frame.If vars is a sequence print bindings that are contained in a sequence.If vars is not a sequence print all bindings only if vars boolean value is true.

builtin function in package base.funcs defined at class io.opsit.explang.Funcs$BACKTRACE

BEAN

Convert Java Bean to a Map.

BEAN(object, prefix:=NIL, suffix:=NIL)

Returns a Map based on getters in the passed java object. Accepts optional prefix and suffics arguments that are used to modify the generated keys.

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$BEAN

BOOL

Coerce Value to Boolean.

BOOL(value)

Value may be a Character, a Number, a Boolean, a Byte, a String, any object or NIL:
* Boolean value will be returned as is
* NIL is false
* Character   is false.
* any Number which is equal to zero is false
* an empty String is false
* An empty collection is false 
* Any other object is true.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$BOOL

BOUNDP

Check if Symbols are Bound.

BOUNDP(symbols...)

Returns True if all the arguments are bound symbols or names of bound symbols; otherwise, returns False.

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$BOUNDP

BYTE

Coerce Value to Byte.

BYTE(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point values will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$BYTE

C

CHAR

Coerce Value to Character.

CHAR(value)

Value may be a Character, a Number, a Boolean, a Byte, a Stringor NIL:
* Character value will be returned as is.
* NIL will be converted to unicode value #.
* a Boolean True value will be returned as character 'T', False as ''.
* a Number (other than Byte) will be truncated to short (if needed) and the character at corresponding Unicode code unit will be returned.
* a Byte value will be treated as unsigned integer value and processed as described above.
* a String will be parsed as number using same rules as numeric literals and the resulting value will be used as described above. Conversion to number may fail.
* Any other object will cause conversion error.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$CHAR

CLASS

Return Class by Class Name.Return class object according to it's fully qualified class name.

CLASS(class-spec)

class-spec may be string, symbol or any object,which string representation will be used

builtin function in package ffi defined at class io.opsit.explang.Funcs$CLASS

COLLP

COLLP(object)

Check if an object is a sequence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$COLLP

COND

Conditional switch construct.

COND(args...)

Operator: if
   if condition
     expr;
     ...
   end
   if condition1
     expr;
     ...
   elseif condition2
     expr;
     ...
   else
     expr;
     ...
   end

COND allows the execution of forms to be dependent on test-form.
Test-forms are evaluated one at a time in the order in
which they are given in the argument list until a
test-form is found that evaluates to true.  If there
are no forms in that clause, the value of the test-form
is returned by the COND form.  Otherwise, the forms
associated with this test-form are evaluated in order,
left to right and the value returned by the last form
is returned by the COND form.  Once one test-form has
yielded true, no additional test-forms are
evaluated. If no test-form yields true, nil is
returned.

builtin form in package base.control defined at class io.opsit.explang.Compiler$COND

CONS

CONS(object-1, object-2)

Prepend element to a list.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$CONS

COPY

COPY(object)

Perform shallow copy of an object.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$COPY

D

DEEP_COPY

DEEP_COPY(object)

Perform deep copy of an object.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$DEEP_COPY

DEFUN

DEFUN(name, (arglist), body)

Operator: function
   function symbol ( arglist )
     expr;
     ...
   end;

Define named function

builtin form in package base.funcs defined at class io.opsit.explang.Compiler$DEFUN

DELETE

Delete an element from a sequence by key or index.

DELETE(seq, key)

Returns a copy of the target object with the requested element removed.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$DELETE

DELETE!

Delete an element from a sequence by key or index.

DELETE!(seq, key)

Returns the removed element.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NDELETE

DESCRIBE_FUNCTION

Describe function.

DESCRIBE_FUNCTION(function)

Return textual description of given function or built-in form. function is a symbol or function name or a lambda

builtin function in package base.docs defined at class io.opsit.explang.Funcs$DESCRIBE_FUNCTION

DLET

DLET(args ...)

Destructuring LET construct.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$DLET

DOCUMENTATION

Get Function Docstring.

DOCUMENTATION(function-name)

Return documentation string of given function or built-in form. function is a symbol or function name or a lambda

builtin function in package base.docs defined at class io.opsit.explang.Funcs$DOCUMENTATION

DOUBLE

Coerce Value to Double.

DOUBLE(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point values will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$DOUBLE

DWIM_FIELDS

Return a new object with those fields in 'src', which were specified in 'fieldspecs'.

DWIM_FIELDS(src, fieldspecs)

When 'src' is a map or a Java Bean the function will return new map with the specified
fields from the source object.

  When 'src' is a sequence the above operation will be performed on every object of the 
sequence.

  When 'src' is a NIL, return NIL.

Format of 'fieldspecs': list of one or mod field specifications:

builtin function in package dwim defined at class io.opsit.explang.DWIM$DWIM_FIELDS

DWIM_MATCHES

Perform Do What I Mean style search.

DWIM_MATCHES(object, pattern:=NIL)

Operator: =~
   value =~ r"regexp"
   value =~ "substring"
   value =~ value2
   value =~ predicate_expression

When pattern is an Regexp tries to find the regexp in String Representation of object.
  When pattern is a String it tries to find its occurences in the String Representation of object.
 When pattern is a Number then numeric equality check is performed. 
 When pattern is any other object the equality test is performed. 
 If there were matches the function returns list of matches. 
If there is no match an empty list is returned.

builtin function in package base.logic defined at class io.opsit.explang.DWIM$DWIM_MATCHES

E

EQUAL

Check Object Equality.

EQUAL(x, y)

Returns true if x equal to y according to call to Java method x.equals(y) or if both objects are NIL.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$EQUAL

EVAL

Evaluate a Parsed Expression.

EVAL(form)

Evaluates parsed form in the current dynamic context and return result of evaluation'

builtin function in package base.lang defined at class io.opsit.explang.Funcs$EVAL

EXCEPTION

Creates an Exception Object.

EXCEPTION(; message:=NIL)

Returns new ExecutionException with given message.

builtin function in package base.control defined at class io.opsit.explang.Funcs$EXCEPTION

EXP

Perform exponentiation.

EXP(x, base:=NIL)

If base is not given it returns e raised to power x. Returns a Double value.

builtin function in package base.math defined at class io.opsit.explang.Funcs$EXP

F

FILTER

Filter operation.

FILTER(test, #= &PIPE =# sequence)

test is a function of one argument that returns boolean, seq is input sequence. Return a sequence from which the elements that do not satisfy the test have been removed.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$FILTER

FIRST

Returns the first element of the sequence.

FIRST(sequence)

Returns NIL when sequence is NIL or empty

builtin function in package base.seq defined at class io.opsit.explang.Funcs$FIRST

FLOAT

Coerce Value to Float.

FLOAT(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point values will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$FLOAT

FOREACH

Foreach Loop Over a Sequence.

FOREACH((var, sequence, result:=NIL), body...)

Operator: for
   FOR var IN sequence
     expr;
     ...
   end
   FOR var IN sequence RESULT expr
     expr;
     ...
   end

Evaluates 'body' in new context with VAR bound to each element from SEQUENCE, in turn.
Then evaluate RESULT in the same context to get return value, default is NIL.

builtin form in package base.seq defined at class io.opsit.explang.Compiler$FOREACH

FORMAT

Format String.

FORMAT(format, values...)

Returns a formatted string using the specified format string (in the format of java.util.Formatter) and arguments. Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. Throws IllegalFormatException - If a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions.

builtin function in package base.text defined at class io.opsit.explang.Funcs$FORMAT

FSET

FSET(symbol, value)

Set symbol's function value to value and return previous value or NIL.

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$FSET

FUNCALL

Call function f with arguments.

FUNCALL(function, #= &PIPE =# arguments...)

funcall calls function f with given arguments.

builtin function in package base.funcs defined at class io.opsit.explang.Funcs$FUNCALL

FUNCTION

FUNCTION(symbol)

Get Function Given it's symbol.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$FUNCTION

FUNCTIONP

Check if object is a function.

FUNCTIONP(object)

Returns true if object is a function (built-in or user defined); otherwise, returns false. A function is an object that represents code to be executed when an appropriate number of arguments is supplied. A function can be directly invoked by using it as the first argument to funcall, apply.

builtin function in package base.funcs defined at class io.opsit.explang.Funcs$FUNCTIONP

FUNCTIONS_NAMES

Get list of names of defined functions.

FUNCTIONS_NAMES(names...)

If names are given use them as filter expressions: only those which match at least one of filter expressions will be returned. Filters may be strings (substring match) or regular expressions (java.util.regex.Pattern objects).

builtin function in package base.docs defined at class io.opsit.explang.Funcs$FUNCTIONS_NAMES

G

GET

Returns the value from an associative structure.

GET(structure, key, not-found:=NIL)

Return value from an associative structure struct, 
 Returns NIL if the key is not present, or the not-found value if supplied.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$GET

GETPROP

Get Variable Property.

GETPROP(symbol, property-key)

Returns value of a property from variable property map

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$GETPROP

GETPROPS

GETPROPS(symbol)

Get Properties Map for a Variable.

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$GETPROPS

GET_IN

Returns the value from an hierarchy of associative structures.

GET_IN(structure, ks, not-found:=NIL)

Operator: .
   a.b
   a.b.c
Operator: []
   a[1]
   a[1][2]
   b["foo"]

Return value from an associative structure struct, 
where ks is a sequence of keys. Returns NIL if the key
 is not present, or the not-found value if supplied.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$GET_IN

H

HASHMAP

Create a HashMap.

HASHMAP(pairs...)

Returns new HashMap filled with given keys and values. Throws InvalidParametersException if non-even number of arguments is given.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$HASHMAP

HASHSET

Create a HashSet.

HASHSET(args...)

Returns a set containing the supplied objects.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$HASHSET

HASKEY

HASKEY(seq, keyidx)

Check whether Map or indexed sequence has given key or index.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$HASKEY

I

IF

IF(condition, then-expr, else-exprs...)

If-else conditional construct.

builtin form in package base.control defined at class io.opsit.explang.Compiler$IF

IN

Check if an element is contained in a collection.

IN(elt, #= &PIPE =# col)

Operator: in
   a in [1, 2, 3]
   h in "hello"

builtin function in package base.seq defined at class io.opsit.explang.Funcs$IN

INDEXEDP

INDEXEDP(object)

Check if an object is an indexed collection.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$INDEXEDP

INSERT

Insert element into given position in the indexed sequence.

INSERT(seq, index, object)

Returns a copy of the target sequence with the requested modification.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$INSERT

INSERT!

Insert element into given position in the indexed sequence.

INSERT!(seq, index, object)

Returns the sequence

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NINSERT

INT

Coerce value to Integer.

INT(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point value will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$INT

INTERPOSE

Return sequence elements of seq separated by elements in sep.

INTERPOSE(#= &PIPE =# seq, sep...)

Currently only lists are supported.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$INTERPOSE

J

JOIN

Return sequence elements of seq joined by elements in sep.

JOIN(sep:=NIL, #= &PIPE =# seqs)

Currently only strings are supported.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$JOIN

L

LAMBDA

Define anonymous function.

LAMBDA((arglist), body)

Operator: function
   function ( arglist )
     expr;
     ...
   end
Operator: ->
   ( arglist ) -> expr
   var -> expr

builtin form in package base.control defined at class io.opsit.explang.Compiler$LAMBDA

LENGTH

Return length of a sequence.

LENGTH(sequence)

Parameter may be any supported sequence (collection, array, character sequence) or NIL (0 will be returned).

builtin function in package base.seq defined at class io.opsit.explang.Funcs$LENGTH

LET

Evaluate code with given var.

LET(args ...)

Operator: let
   let var1 := val1, var2, var3:=val3
     expr;
     ...
   end

bindings.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$LET

LIST

Create a list.

LIST(args...)

Returns a list containing the supplied objects.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$LIST

LOAD

Execute program from a file/stream.

LOAD(file-spec)

Sequentially executes each form it encounters in the input file/or stream named by resource-spec. Returns exception if input could not be read or there were exceptions while compiling or executing forms an exception will be raised. file-spec may be a java.io.File object, file path as String or opened InputStream.

builtin function in package io defined at class io.opsit.explang.Funcs$LOAD

LOADR

Execute program from Java resource.

LOADR(resource-spec)

Sequentially executes each form it encounters in the java resource file named by resource-spec. Returns exception if file could not be read or there were exceptions while compiling or executing forms an exception will be raised.

builtin function in package io defined at class io.opsit.explang.Funcs$LOADR

LOG

Computes logarithm.

LOG(x, base:=NIL)

If base is not given it computes natural logarithm. Returns a Double value.

builtin function in package base.math defined at class io.opsit.explang.Funcs$LOG

LONG

Coerce Value to Long.

LONG(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point values will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$LONG

LOWERCASE

LOWERCASE(value)

Convert character, string or character sequence to lower case.

builtin function in package base.text defined at class io.opsit.explang.Funcs$LOWERCASE

M

MAKE_ARRAY

Create an Array.

MAKE_ARRAY(elements...; size:=NIL, elementType:=NIL)

Creates array of objects of specified size. Optional :elementType argument specifies type of array elements. The default is java.lang.Object

builtin function in package base.seq defined at class io.opsit.explang.Funcs$MAKE_ARRAY

MAKUNBOUND

Unbind variable given by symbol.

MAKUNBOUND(symbol)

Always returns symbol.

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$MAKUNBOUND

MAP

Apply function on elements of collections.

MAP(func, #= &PIPE =# lists...)

Returns a sequence consisting of the result of applying func to the set of first items of each list, followed by applying func to the set of second items in each list, until any one of the lists is exhausted. Any remaining items in other lists are ignored. Function func should accept number arguments that is equal to number of lists.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$MAP

MAPP

MAPP(object)

Check if an object is a Map.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$MAPP

MAPPROD

Apply function on cartesioan product of lists.

MAPPROD(f, #= &PIPE =# lists...)

Returns a sequence consisting of the result of applying func to the cartesian product of the lists. Function func should accept number arguments that is equal to number of lists.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$MAPPROD

MAX

Find maximum.

MAX(x, args...)

Returns the maximum of numeric values of it's arguments,
performing any necessary type conversions in the process.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$MAXOP

MIN

Find minimum.

MIN(x, args...)

Returns the maximum of numeric values of it's arguments,
performing any necessary type conversions in the process.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$MINOP

MOD

Compute Modulus.

MOD(number, divisor)

Generalizations of the modulus function. When both operands are integer returns result of the modulus operation. If one of them is floating point returns result of 
     number - ⌊ (number / divisor) ⌋ * divisor 

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$MODOP

N

NEW_CTX

NEW_CTX()

Create New Empty Context

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$NEW_CTX

NEW_THREAD

Create new Java thread.

NEW_THREAD(fn, name:=NIL)

Creates new Java thread and prepare it for execution of given function fn.fn must not require parameters for it's execution. The created thread is not started.

builtin function in package threads defined at class io.opsit.explang.Funcs$NEW_THREAD

NILP

NILP(object)

Check if a value is a NIL.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NILP

NOT

Logical Negation.

NOT(x)

Operator: not
   not x

Returns True if x has false logical value; otherwise, returns False.Parameter x can be any object. Only NIL, the empty list (), the empty String "", 0 and FALSE have false logical value. All other objects have true logical value

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NOT

NOTNILP

NOTNILP(object)

Check if a value is not a NIL.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NOTNILP

NOT_IN

Check if an element is not contained in a collection.

NOT_IN(elt, #= &PIPE =# col)

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NOTIN

NTH

Locates the nth element of a sequence.

NTH(n, #= &PIPE =# sequence)

n may be any non-negative number. Returns NIL when sequence is NIL or n is out of bounds

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NTH

O

OR

Logical OR operation.

OR(#= &LAZY =# args...)

Operator: or
   x or b

Function `OR` lazily evaluates each argument expression, one at a time, from
left to right. The evaluation of the argument expressions terminates when one
of them evaluates to an implicit logical `true` and `OR` immediately returns
that value without evaluating the remaining expressions (if any). If all
evaluate to logical false `OR` returns the result of the last expression.
If no arguments were supplied, it returns logical false.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$OR

P

POP

Remove an element from the end of a sequence.

POP(seq)

Returns list with the removed element and a copy of the sequence withthis element removed.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$POP

POP!

Remove an element from the end of a sequence modifying the sequence.

POP!(seq)

Returns the removed element.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NPOP

PRINT

PRINT(args...)

Print Arguments on standard output.

builtin function in package io defined at class io.opsit.explang.Funcs$PRINT

PRINTLN

PRINTLN(args...)

Print Arguments on standard output and print newline.

builtin function in package io defined at class io.opsit.explang.Funcs$PRINTLN

PROGN

PROGN(args ...)

Operator: begin
   begin
     expr;
     ...
   end

Evaluate sequence of expressions.

builtin form in package base.control defined at class io.opsit.explang.Compiler$PROGN

PUSH

Append element to the end of a seqence.

PUSH(seq, object)

Returns copy of the target object with the requested change.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$PUSH

PUSH!

Append element to the end of a seqence modifying the sequence.

PUSH!(seq, object)

Returns the sequence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NPUSH

PUT

Put element value into an associative structure (non-mutating).

PUT(target, key, object)

Set value of element at index/key in the target structure to object. 
If target ibject is a Java array and the object type does not match the type
of this array this function will attempt to perform necessary coercion
operations. The coercions  work in the same way as INT, FLOAT, STRING
and rest of the built-in coercion functions.

If target object is a list or and array and happens out of bound exception
the function returns normally without any change to the target structure

The function returns copy of the target object with the requested change.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$PUT

PUT!

Put element value into an associative structure.

PUT!(target, key, object)

Set value of element at index/key in the target structure to object. 
If target ibject is a Java array and the object type does not match the type
of this array this function will attempt to perform necessary coercion
operations. The coercions  work in the same way as INT, FLOAT, STRING
and rest of the built-in coercion functions.

If target object is a list or and array and happens out of bound exception
the function returns normally without any change to the target structure

The function returns previous value of the element or NIL if it did not exist
or no change has been made.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NPUT

PUT_IN

Put value into an hierarchy of associative structures according list of keys.

PUT_IN(structure, keys, value, new-col:=NIL)

The function deep-copies the target structurem performs modifications and returns 
the copy without touching the original structure.

Arguments:

- structure - the target hierarchical structure of nested Maps, Lists, arrays, etc.
- keys - list of keys/indexes.  The function will navigate into the nested objects
         using the keys up to the last key in the list. The last one will be used
         to insert the `value` into the structure.
- value - value to be inserted
- new-col - This collection will be copied and inserted into the target structure
            in case the function navigates into missing values or NIL in the target
            structure.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$PUT_IN

PUT_IN!

Put value into an hierarchy of associative structures according list of keys.

PUT_IN!(structure, keys, value, new-col:=NIL)

The function returns the target structure after performing modifications.

Arguments:

- structure - the target hierarchical structure of nested Maps, Lists, arrays, etc.
- keys - list of keys/indexes. The function will navigate into the nested objects
         using the keys up to the last key in the list. The last one will be used
         to insert the `value` into the structure.
- value - value to be inserted
- new-col - This collection will be copied and inserted into the target structure
            in case the function navigates into missing values or NIL in the target
            structure.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NPUT_IN

Q

QUOTE

QUOTE(args ...)

Return its argument without evaluation.

builtin form in package base.lang defined at class io.opsit.explang.Compiler$QUOTE

R

RANDOM

Produce Pseudo-Random Number.

RANDOM(limit)

Returns a pseudo-random number that is a non-negative number less than limit and of the same numeric type as limit. Implemented uding Java Math.random()

builtin function in package base.math defined at class io.opsit.explang.Funcs$RANDOM

RANGE

Return sequence of numbers.

RANGE(start, stop, step:=NIL)

Returns sequence of numbers from start to stop (inclusively) with .

builtin function in package base.seq defined at class io.opsit.explang.Funcs$RANGE

READ_FROM_STRING

Parse expression from string.

READ_FROM_STRING(string)

Reads expression from string using default parser. Returns expression or NIL if no expression has been read

builtin function in package io defined at class io.opsit.explang.Funcs$READ_FROM_STRING

REDUCE

Reduce operation.

REDUCE(func, val:=NIL, #= &PIPE =# seq)

func is a function of 2 arguments, value - optional starting value, seq is input sequence.
When val is not given:  apply func to the first 2 items in the seq, then to the result and 3rd, etc. If seq contains no items, func must accept no arguments, return (func).If seq has 1 item, return it without calling func;
If value is supplied, apply func on value and the first seq element, then on the result and the second element, etc. If there is no elements - return val;

builtin function in package base.seq defined at class io.opsit.explang.Funcs$REDUCE

REM

Compute Remainder.

REM(x, y)

Generalizations of the remainder function. When both operands are integer returns result of the remainder operation . If one of them is floating point returns result of 
     number - truncate_to_zero (number / divisor) * divisor (same semantic as for the Java % operator.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$REMOP

REPLACE

Replace eache subsequence in seq that equals to target with replacement sequence.

REPLACE(seq, target, replacement:=NIL)

Return resulting sequence. The original sequence is not modified. If replacement is not provided or is NIL the target sequences will be deleted.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$REPLACE

REST

REST(sequence)

Return 2nd and further elements of sqeuence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$REST

RETURN

RETURN(value)

Operator: return
   return value;

Return value from function

builtin function in package base.control defined at class io.opsit.explang.Funcs$RETURN

REVERSE

REVERSE(sequence)

Reverse a sequence (non-destructive).

builtin function in package base.seq defined at class io.opsit.explang.Funcs$REVERSE

REVERSE!

REVERSE!(sequence)

Reverse a sequence (destructive).

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NREVERSE

RE_FIND

Perform Regexp Find.

RE_FIND(arg0, #= &PIPE =# arg2:=NIL)

When called With two arguments creates java.util.regex.Matcher using pattern and char-seq.
  When called with one arguments it uses given Matcher. 
 Returns the next ,match, if any, of string to pattern, using Matcher.find(). 
 if no groups were defined it returns the matched string.
 If groups were defined it returns a list consisting of the full match and matched groups
 If there is no match NIL is returned

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_FIND

RE_GLOB

Compile a Globbing Pattern.

RE_GLOB(pattern, flags:=NIL)

On success returns a java.util.regex.Pattern object. On error raises exception.

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_GLOB

RE_GROUPS

Return Groups for a Regexp Match.

RE_GROUPS(matcher)

Returns the groups from the most recent match/find.
If there are no nested groups, returns a string of the entire
match. If there are nested groups, returns a list of the groups,
the first element being the entire match.

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_GROUPS

RE_MATCHER

Return Regexp Matcher.

RE_MATCHER(pattern, #= &PIPE =# char-seq)

Returns an instance of java.util.regex.Matcher, for use, e.g. in RE-FIND.

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_MATCHER

RE_MATCHES

Perform regexp match.

RE_MATCHES(arg0, #= &PIPE =# arg2:=NIL)

When called With two arguments created java.util.regex.Matcher using pattern and char-seq.
  When called with one arguments it uses given Matcher. 
 Returns the match, if any, of string to pattern, using Matcher.matches(). 
 if no groups were defined it returns the matched string.
 If groups were defined it returns a list consisting of the full match and matched groups
 If there is no match NIL is returned

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_MATCHES

RE_PATTERN

Compile A Regexp Pattern.

RE_PATTERN(pattern, flags:=NIL)

On success returns a java.util.regex.Pattern objec. On error raises exception.

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_PATTERN

RE_SEQ

Return Results of Regexp Find as a Lazy Sequence.

RE_SEQ(arg0, #= &PIPE =# arg2:=NIL)

When called With two arguments created java.util.regex.Matcher using pattern and char-seq.
  Returns lazy iterable sequence (instance of Iterable) of matches of string to pattern, using Matcher.find(). 
 When called with one arguments it uses given Matcher. 
 if no groups were defined the elements of the sequence are the matched string.
 If groups were defined it returns a list consisting of the full match and matched groups
 If there is no match empty sequence is returned

builtin function in package base.regex defined at class io.opsit.explang.Funcs$RE_SEQ

S

Perform DWIM search of an item in a sequence of objects.

SEARCH(sequence, test)

Operator: search
   [val1, val2, val3] SEARCH r"regexp"
   [val1, val2, val3] SEARCH "substring"
   [val1, val2, val3] SEARCH "substring"
   [val1, val2, val3] SEARCH atom
   [val1, val2, val3] SEARCH predicate_expression

builtin form in package dwim defined at class io.opsit.explang.Compiler$SEARCH

SELECT_KEYS

Returns a map containing only those entries in map whose key is in keys.

SELECT_KEYS(object, keyseq)

builtin function in package base.seq defined at class io.opsit.explang.Funcs$SELECT_KEYS

SEQP

SEQP(object)

Check if an object is a sequence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$SEQP

SET

Change variable value in specified context.

SET(symbol, value; uplevel:=NIL, level:=NIL)

Set changes the contents of variable symbol in the dynamic context to the given value. If uplevel is set the value will be set in the uplevel-ths previous context. If level is set the value will be changed in the level-th context from the level0

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$SET

SETF

SETF(args ...)

Operator: :=
   var := expr;
   [var1, var2, var3] := [ val1, val2, val3];
   [var1, [var2, var3]] := [ val1, [val2, val3]];
   {var1 : "key1", var2 : "key2"} := {"key2" : val2, "key1" : val1};

Set value of a variable o location (place in a list , array, etc.) to value.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$SETF

SETL

Assign values to local variables.

SETL(args...)

Operator: :=
   local var := expr;

For each pair of arguments 'var', 'expr' in
the list of arguments {'var' 'expr'}* it will evaluate the 'expr' and assign the
result to local variable 'var'. If the variable already exists in the local scope
its value will be replaced. And if not, a new binding will be created in the local
scope, possibly shadowing the variable in upper scopes.

Arguments:
  'var'  - a symbol naming a variable.
  'expr' - an expression to be evaluated, the result will be assigned to 'var'.
Returns:
  value of the last 'expr', or NIL if no pairs were supplied.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$SETL

SETP

SETP(object)

Check if an object is a Set.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$SETP

SETPROP

Set variable property.

SETPROP(symbol, property-key, property-value)

Sets property value in variable property map

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$SETPROP

SETPROPS

SETPROPS(symbol, properties-map)

Set Properties Map for a Variable

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$SETPROPS

SETQ

Assign values to variables, create new global one if the binding does not exist.

SETQ(args...)

Operator: :=
   global var := expr;

For each pair of arguments it will evaluate the 'form' and assign the result to
variable 'var' if it already exists, possibly replacing the existing binding.
If not, new binding will be created in the global scope

Arguments:
  'var' - a symbol naming a variable.
  'form' - an expression to be evaluated, the result will be assigned to 'var'.
Returns:
  value of the last form, or nil if no pairs were supplied.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$SETQ

SETV

Assign values to variables, create new local one if the binding does not exist.

SETV(args...)

For each pair of arguments it will evaluate the 'form' and assign the result to
variable 'var' if it already exists, possibly replacing values that exist in the
local or an upper scope. If not, new binding will be created in the local scope

Arguments:
  'var' - a symbol naming a variable.
  'form' - an expression to be evaluated, the result will be assigned to 'var'.
Returns:
  value of the last form, or nil if no pairs were supplied.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$SETV

SHORT

Coerce Value to Short.

SHORT(value)

Value may be a Number, String, any object or NIL.String will be parsed as number using same rules as numeric literals. The floating point values will be truncated.

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$SHORT

SIGNUM

Return Number Sign.

SIGNUM(x)

Determines a numerical value that indicates whether number is negative, zero, or positive. Returns one of -1, 0, or 1 according to whether number is negative, zero, or positive. The type of the result is of the same numeric type as x

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$SIGNUM

SORT

SORT(f:=NIL, #= &PIPE =# sequence)

Sort a sequence (non destructively).

builtin function in package base.seq defined at class io.opsit.explang.Funcs$SORT

SORT!

SORT!(f:=NIL, #= &PIPE =# sequence)

Sort a sequence (destructively).

builtin function in package base.seq defined at class io.opsit.explang.Funcs$NSORT

SQRT

Computes square root of the argument.

SQRT(x)

Returns double value.

builtin function in package base.math defined at class io.opsit.explang.Funcs$SQRT

STR

Concatenate Strings.

STR(values...)

Returns concatenation of string representationx of the function arguments. NIL arguments are ignored.

builtin function in package base.text defined at class io.opsit.explang.Funcs$STR

STRING

Coerce Value to String.

STRING(value)

Value may be any object or NIL: NIL is converted to String "NIL", any other object converted using it's toString() method

builtin function in package base.coercion defined at class io.opsit.explang.Funcs$STRING

STRING_BUFFER

Create and initialize a StringBuffer object.

STRING_BUFFER(args...)

Return stringbuilder with all the arguments concatenated.

builtin function in package base.text defined at class io.opsit.explang.Funcs$STRINGBUFFER

STRING_BUILDER

Create and initialize a StringBuilder object.

STRING_BUILDER(args...)

Return stringbuilder with all the arguments concatenated.

builtin function in package base.text defined at class io.opsit.explang.Funcs$STRINGBUILDER

SUBSEQ

Return subsequence of a sequence.

SUBSEQ(sequence, start, end:=NIL)

subseq creates a sequence that is a copy of the subsequence of sequence bounded by start and end. Start specifies an offset into the original sequence and marks the beginning position of the subsequence. end marks the position following the last element of the subsequence. subseq always allocates a new sequence for a result; it never shares storage with an old sequence. The result subsequence is of the same kind as sequence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$SUBSEQ

SYMBOL

SYMBOL(symbol-name)

Makes new Symbol for a string

builtin function in package base.bindings defined at class io.opsit.explang.Funcs$SYMBOL

SYMBOL_FUNCTION

Returns function bound to given symbol.

SYMBOL_FUNCTION(symbol)

If no function bound raises an error. The returned object may be a built-in function, compiled function or built-in special form.

builtin function in package base.funcs defined at class io.opsit.explang.Funcs$SYMBOL_FUNCTION

T

TAKE

Return first n elements of a sequence.

TAKE(n, #= &PIPE =# seq)

take creates new sequence with first n elements of seq. If n is bigger than length of the sequence all the elementsare returned. The result subsequence is of the same kind as sequence.

builtin function in package base.seq defined at class io.opsit.explang.Funcs$TAKE

THROW

Throw Java Exception.

THROW(exception)

The exception may be a java Throwable object or String. In the latter case a new ExecutionException with given message will be created and thrown.

builtin function in package base.control defined at class io.opsit.explang.Funcs$THROW

TRY

Try-Catch-Final construction.

TRY(body, (catch, exception, var, catch_body), (finally, finally_body))

Operator: try
   try
      expr;
      ...
   catch (some.Exception ex)
      expr;
      ...
   catch ex
      expr;
      ...
   finally
      expr;
      ...
   end

The expressions in the `try` body are evaluated and, if no exceptions
occur, the value of the last is returned.
If an exception occurs and `catch` clauses are provided, each one is examined
in turn and the first for which the thrown exception is an instance of the
named class is considered a matching `catch` clause. If there is a matching
`catch` clause, the thrown exception is put into variable with the name `var`
and the expressions in the `catch_body` are evaluated and the value of the
last one is the return value of the function.
If there is no matching `catch` clause, the exception propagates out of the
function.
Before returning, normally or abnormally, any expressions in the `finally_body`
will be evaluated for their side effects.

builtin form in package base.control defined at class io.opsit.explang.Compiler$TRY

TYPEP

Check if Object is of Specified Type.

TYPEP(object, type-specifier)

Returns True if object is of the specified type. Type specifier may be a Class object or string or symbol which is a valid type-specifier.

builtin function in package base.types defined at class io.opsit.explang.Funcs$TYPEP

TYPE_OF

Return Object Type.

TYPE_OF(object)

Returns type (as class) of the given object. For NIL argument return NIL.

builtin function in package base.types defined at class io.opsit.explang.Funcs$TYPE_OF

U

UPPERCASE

UPPERCASE(value)

Convert character, string or character sequence to upper case.

builtin function in package base.text defined at class io.opsit.explang.Funcs$UPPERCASE

V

VERSION

Create Version from text specification.

VERSION(spec)

builtin function in package base.version defined at class io.opsit.explang.Funcs$VERSION

W

WHEN

WHEN(args ...)

When conditional construct.

builtin form in package base.control defined at class io.opsit.explang.Compiler$WHEN

WHILE

While loop construction.

WHILE(condition, body...)

Operator: while
   while (conditional expr)
     expression;
     ...
   end

Execute sequnce of expressions while the consition is true

builtin form in package loops defined at class io.opsit.explang.Compiler$WHILE

WITH_BINDINGS

WITH_BINDINGS(args ...)

Evaluate code with bindings from a Java Map.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$WITH_BINDINGS

WITH_CTX

WITH_CTX(args ...)

Evaluate code in given context.

builtin form in package base.bindings defined at class io.opsit.explang.Compiler$WITH_CTX

_

_>

_>(args ...)

Threading form on first argument

builtin form in package base.seq defined at class io.opsit.explang.Compiler$TH_1ST

_>>

_>>(args ...)

Threading form on last argument.

builtin form in package base.control defined at class io.opsit.explang.Compiler$TH_LAST

%

%

Compute Remainder.

%(x, y)

Operator: %
   a % b

Generalizations of the remainder function. When both operands are integer returns result of the remainder operation . If one of them is floating point returns result of 
     number - truncate_to_zero (number / divisor) * divisor (same semantic as for the Java % operator.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$REMOP

*

*

Compute Product.

*(args...)

Operator: *
   a * b

Returns the product of all its arguments performing any necessary type
conversions in the process. If no numbers are supplied, 1 is returned.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$MULOP

+

+

Compute Sum.

+(args...)

Operator: +
   a + b

Computes sum of function arguments performing any necessary type conversions
in the process. If no numbers are supplied, 0 is returned.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$ADDOP

-

-

Performs subtraction or negation.

-(args...)

Operator: -
   a - b
   - x

If only one number is supplied, the negation of that 
number is returned. If more than one argument is given, 
it subtracts rest of the arguments from the first one 
and returns the result. The function performs necessary 
type conversions.

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$SUBOP

.

.

Call Java Object Method/Read FieldCall method of java object or read contend of object field.

.(object, call-args...)

builtin function in package ffi defined at class io.opsit.explang.Funcs$DOT

.N

Return New Class Instance.

.N(class, arglist:=NIL, typeslist:=NIL)

Optional arglist and typeslist parameters specify parameters to be passed to cosnstructor and their types. When typelist not given it tries to find most narrowly matching constructor on the basis of types of the arguments in arglist. If typeslist is provided exactly matching constructor will be used.

builtin function in package ffi defined at class io.opsit.explang.Funcs$DOTN

.S

Call Static Java Method/Read Static FieldCall method of java object or read contend of object field.

.S(class, call-args...)

builtin function in package ffi defined at class io.opsit.explang.Funcs$DOTS

/

/

Performs Division or Reciprocation.

/(args...)

Operator: /
   a / b

- If no denominators are supplied, the function '/' returns the reciprocal
  of the argument.
- If at least one denominator is supplied, the function '/' divides the
  numerator by all of the denominators and returns the resulting quotient.
The function / performs necessary type conversions. 

builtin function in package base.arithmetics defined at class io.opsit.explang.Funcs$DIVOP

<

<

Less Than - Numeric Comparison.

<(x, args...)

Operator: <
   a < b

Returns True if all arguments are monotonically increasing order. Returns True if only one argument is given

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NUMLT

<=

Less or Equal - Numeric comparison.

<=(x, args...)

Operator: <=
   a <= b

Returns True if all arguments are monotonically non-decreasing order. Returns True if only one argument is given

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NUMLE

=

=

Test numeric equality.

=(x, args...)

Operator: =
   a = b

Returns True if all arguments are numerically equal. Returns True if only one argument is given

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NUMEQ

==

Check Value Equality.

==(x, y)

Operator: ==
   a == b

Returns true if x equal to y according to call to Java method x.equals(y) or if both objects are NIL. If they are not, it returns true if thy are equal numerically or structurally.

builtin function in package base.logic defined at class io.opsit.explang.Funcs$SEQUAL

===

Check Object Equality.

===(x, y)

Operator: ===
   a === b

Objects identity check: returns true if Object x is same as Object y. Uses java operator == to check objects identity

builtin function in package base.logic defined at class io.opsit.explang.Funcs$EQ

>

>

Greater Than - Numeric comparison.

>(x, args...)

Operator: >
   a > b

Returns True if all arguments are monotonically decreasing order. Returns True if only one argument is given

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NUMGT

>=

Greater or Equal - Numeric comparison.

>=(x, args...)

Operator: >=
   a >= b

Returns True if all arguments are monotonically non-increasing order. Returns True if only one argument is given

builtin function in package base.logic defined at class io.opsit.explang.Funcs$NUMGE