AetherlangLib: Base
Base library is a library you must include at the beginning of any program, as it contains definitions for most basic functions like, say, addition or substraction. This page is mostly raw documentation, since most of the functions in base are easy to describe with no illustrations. See tutorials if you don't understand this library.
aetherclear dummy @-> void
@ where dummy: any
@ removes everything from ether.
aetherdel name @-> void
@ where name: symbol or string
@ removes NAME from ether. NAME should not include the "aether." prefix.
aethersize dummy @-> number
@ where dummy: any
@ returns the number of names defined in ether.
aetherwait name @-> void
@ where name: symbol or string
@ waits for a certain NAME to appear in ether, pauses the calling dimension's execution until that point. NAME should not include the "aether." prefix.
call f args @-> any
@ where f: function
@ args: array
@ calls function F with given set of parameters. returns the result
arr
array
collect arg1...argN @-> array
@ where arg1...argN: any
@ returns an array of given arguments.
in?
contains? val coll @-> void or number
@ where val: any
@ coll: array
@ returns index of the first entry of VAL in COLL or void.
dimwait name @-> void
@ where name: symbol or string
@ waits for a certain dimension to end, pauses the calling dimension's execution until that point.
do exp1...expN @-> any
@ where exp1 ... expN: symbols
@ evaluates expressions given as symbols in that exact order. returns the result of the last evaluation.
emp
emplace coll indx val @-> array
@ where coll: array
@ indx: number
@ val: any
@ returns COLL but with VAL at INDX instead.
eq
eq?
equal? arg1...argN @-> void or 1
@ where arg1...argN: any
@ returns 1 if all of the given arguments are equal and void otherwise.
exists? name @-> void or 1
@ where name: symbol or string
@ checks whether a certain name exists. to check in ether simply include "aether." prefix in the name.
[v0.2+]
exit dummy @-> void or 1
@ where dummy: any
@ exits.
fst
first coll @-> any
@ where coll: any
@ returns the first element of COLL.
for itername iteratable action @-> any
@ where itername: symbol
@ iteratable: array or string
@ action: symbol
@ evaluates the action given as symbol for each element of the ITERATABLE. returns the result of the last evaluation.
get coll indx @-> any
@ where coll: any
@ indx: any
@ indexes COLL at INDX.
gotime t @-> void
@ where t: timepoint
@ jumps to a given timepoint. safe "goto" method
if cond exp1 [exp2] @-> any
@ where cond: any
@ exp1: symbol
@ exp2: symbol
@ if COND is void does nothing or evaluates EXP2 (if given). evaluates EXP1 otherwise.
include path @-> void
@ where path: string
@ includes a ".aein" definition-file from a given path.
lambda argname1...argnameN exp @-> function
@ where argname1...argnameN: symbols
@ exp: symbol
@ makes a lambda function with given argument names and EXP as its body.
last coll @-> any
@ where coll: any
@ returns the last element of COLL.
len coll @-> number
@ where coll: any
@ returns length of the given instance if it is possible.
not arg @-> void or 1
@ where arg: any
@ returns 1 if ARG is void and void otherwise.
or arg1 arg2 @-> void or 1
@ where arg1: any
@ arg2: any
@ returns 1 if ARG1 or ARG2 is not equal to void.
phemp
phantomemplace coll indx val @-> phantomarray
@ where coll: array
@ indx: number
@ val: any
@ returns a phantom representing COLL but with VAL at INDX instead. such phantom can be used as an array.
phpush
phantompush coll val @-> phantomarray
@ where coll: array
@ returns a phantom representing COLL but with VAL added to the end. such phantom can be used as an array.
push coll val @-> array
@ where coll: array
@ returns COLL but with VAL added to the end.
last coll indx @-> array
@ where coll: array
@ indx: number
@ returns COLL without the element at INDX.
set name value @-> any
@ where name: symbol or string
@ value: any
@ binds NAME with a given VALUE. returns that VALUE.
timepoint dummy @-> timepoint
@ where dummy: any
@ returns a timepoint object.
[v0.2+]
tofinish dummy @-> void
@ where dummy: any
@ puts current dimension or ritual into "tofinish" register, which means it will end after executing the current line.
typeof arg @-> symbol
@ where arg: any
@ returns a symbol representing the type of ARG.
until cond action @-> any
@ where cond: symbol
@ action: symbol
@ evaluates the action given as symbol until a condition COND becomes true. returns the result of the last evaluation.
+ arg1...argN @-> number
@ where arg1...argN: numbers
@ returns the sum of all the arguments.
- arg1 [arg2] @-> number
@ where arg1: number
@ arg2: number
@ returns the difference of the arguments if two arguments were given. returns negative of the argument if one was given.
* arg1...argN @-> number or string
@ where arg1...argN: numbers or strings
@ returns the product of all the arguments or concatenates all of them if they are strings of characters.
/ arg1 arg2 @-> number
@ where arg1: number
@ arg2: number
@ divides ARG1 by ARG2
< arg1 arg2 @-> void or 1
@ where arg1: number
@ arg2: number
@ returns 1 if ARG1 is less than ARG2 and void otherwise
> arg1 arg2 @-> void or 1
@ where arg1: number
@ arg2: number
@ returns 1 if ARG1 is bigger than ARG2 and void otherwise