Files
slime/manual/built-in-docs.org
T
2020-02-18 10:52:05 +01:00

32 KiB


**

type
:cfunction
arguments
postitional
a, b
docu

TODO


quote

type
:cfunction
arguments
postitional
datum
docu

TODO


load

type
:cfunction
arguments
postitional
file
docu

TODO


type?=

type
:lambda
arguments
postitional
obj, typ
docu

Checks if the argument obj is of type typ


symbol?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a symbol.


reduce-binary

type
:lambda
arguments
postitional
fun, seq
docu

Takes a function and a sequence as arguments and applies the function to the argument sequence. reduce-binary applies the arguments pair-wise which means it works with binary functions as compared to =reduce=.


test

type
:cfunction
arguments
keyword
k (101)
docu

lambda?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a function.


extend2

type
:lambda
arguments
postitional
seq, elem
docu

Extends a list with the given element, by putting it in the (rest) of the last element of the sequence.


length

type
:lambda
arguments
postitional
seq
docu

Returns the length of the given sequence.


assert

type
:cfunction
arguments
postitional
test
docu

TODO


memstat

type
:cfunction
arguments
none.
docu

TODO


cond

type
:macro
arguments
rest
clauses
docu
none

assert-types=

type
:lambda
arguments
rest
objs
docu
none

<=

type
:cfunction
arguments
rest
args
docu

TODO


bound?

type
:cfunction
arguments
postitional
var
docu

TODO


set-type!

type
:cfunction
arguments
postitional
node, new_type
docu

TODO


end

type
:lambda
arguments
postitional
seq
docu

Returns the last pair in the sqeuence.

{{{example_start}}} (define a (list 1 2 3 4)) (print (end a)) {{{example_end}}}


get-random-between

type
:cfunction
arguments
postitional
a, b
docu

TODO


addr-of

type
:cfunction
arguments
postitional
var
docu

TODO


sublist-starting-at-index

type
:lambda
arguments
postitional
seq, index
docu
none

increment

type
:lambda
arguments
postitional
val
docu

Adds one to the argument.


%

type
:cfunction
arguments
postitional
a, b
docu

TODO


hm/set!

type
:cfunction
arguments
postitional
hm, key, value
docu

TODO


begin

type
:cfunction
arguments
rest
args
docu

TODO


concat-strings

type
:cfunction
arguments
rest
strings
docu

TODO


define-module

type
:macro
arguments
postitional
module-name
keyword
imports (()), exports
rest
body
docu
none

built-in-function?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a built-in function.


zip

type
:lambda
arguments
postitional
l1, l2
docu
none

/

type
:cfunction
arguments
rest
args
docu

TODO


type

type
:cfunction
arguments
postitional
n
docu

TODO


pe

type
:macro
arguments
postitional
expr
docu
none

helper

type
:cfunction
arguments
none.
docu

if

type
:cfunction
arguments
postitional
test, then_part, else_part
docu

TODO


apply

type
:cfunction
arguments
postitional
fun, args
docu

TODO


delete-type!

type
:cfunction
arguments
postitional
n
docu

TODO


when

type
:macro
arguments
postitional
condition
rest
body
docu

Special form for when multiple actions should be done if a condition is true.

{{{example_start}}} (when (not ()) (print "Hello ") (print "from ") (print "when!"))

(when () (print "Goodbye ") (print "World!")) {{{example_end}}}


set-cdr!

type
:cfunction
arguments
postitional
target, source
docu

TODO


break

type
:cfunction
arguments
none.
docu

TODO


reduce

type
:lambda
arguments
postitional
fun, seq
docu

Takes a function and a sequence as arguments and applies the function to the argument sequence. This only works correctly if the given function accepts a variable amount of parameters. If your funciton is limited to two arguments, use =reduce-binary= instead.


<

type
:cfunction
arguments
rest
args
docu

TODO


mutate

type
:cfunction
arguments
postitional
target, source
docu

TODO


set-car!

type
:cfunction
arguments
postitional
target, source
docu

TODO


string?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a string.


generic-extend

type
:macro
arguments
postitional
args
rest
body
docu
none

range-while

type
:lambda
arguments
keyword
from (0), to
docu

Returns a sequence of numbers starting with the number defined by the key 'from' and ends with the number defined in 'to'.


=

type
:cfunction
arguments
rest
args
docu

Takes 0 or more arguments and returns t if all arguments are equal and () otherwise.


info

type
:cfunction
arguments
postitional
n
docu

TODO


*

type
:cfunction
arguments
rest
args
docu

TODO


define-syntax

type
:cfunction
arguments
postitional
form
keyword
doc ("")
rest
body
docu

TODO


vector-ref

type
:cfunction
arguments
postitional
vec, idx
docu

TODO


let

type
:macro
arguments
postitional
bindings
rest
body
docu
none

null?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is nil.


list-without-index

type
:lambda
arguments
postitional
seq, index
docu
none

vector-length

type
:cfunction
arguments
postitional
v
docu

TODO


print

type
:cfunction
arguments
keyword
sep (" "), end ("\n")
rest
things
docu

TODO


symbol->keyword

type
:cfunction
arguments
postitional
sym
docu

TODO


stream-null?

type
:lambda
arguments
postitional
s
docu
none

types?=

type
:lambda
arguments
rest
objs
docu
none

special-lambda?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a special-lambda.


not

type
:cfunction
arguments
postitional
test
docu

TODO


generate-docs

type
:cfunction
arguments
postitional
file_name
docu

TODO


hm/get-or-nil

type
:lambda
arguments
postitional
hm, key
docu
none

the-empty-stream

type
:constructor
value
()
docu
none

force

type
:lambda
arguments
postitional
promise
docu
none

>=

type
:cfunction
arguments
rest
args
docu

TODO


hash-map-get

type
:cfunction
arguments
postitional
hm, key
docu

TODO


exit

type
:cfunction
arguments
keyword
code (0)
docu

TODO


hm/get

type
:cfunction
arguments
postitional
hm, key
docu

TODO


n-times

type
:macro
arguments
postitional
times, action
docu

Executes action times times.


keyword?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a keyword.


range

type
:lambda
arguments
keyword
from (0), to
docu

Returns a sequence of numbers starting with the number defined by the key from and ends with the number defined in to.


vector-set!

type
:cfunction
arguments
postitional
vec, idx, val
docu

TODO


pair

type
:cfunction
arguments
postitional
car, cdr
docu

TODO


mem-reset

type
:cfunction
arguments
none.
docu

TODO


delay

type
:macro
arguments
postitional
expr
docu
none

define-typed

type
:macro
arguments
postitional
args
rest
body
docu
none

pair?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a pair.


unzip

type
:lambda
arguments
postitional
lists
docu
none

number?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a number.


-

type
:cfunction
arguments
rest
args
docu

TODO


extend

type
:lambda
arguments
postitional
seq, elem
docu

Extends a list with the given element, by putting it in the (rest) of the last element of the sequence.


enumerate

type
:lambda
arguments
postitional
seq
docu
none

hash-map-set!

type
:cfunction
arguments
postitional
hm, key, value
docu

TODO


or

type
:cfunction
arguments
rest
args
docu

TODO


rest

type
:cfunction
arguments
postitional
seq
docu

TODO


construct-list

type
:macro
arguments
rest
body
docu

{{{example_start}}} (construct-list i <- '(1 2 3 4 5) yield (* i i)) {{{example_end}}}

(construct-list i <- '(1 2 3 4) j <- '(A B) yield (pair i j))

(construct-list i <- '(1 2 3 4 5 6 7 8) if (= 0 (% i 2)) yield i)


last

type
:lambda
arguments
postitional
seq
docu

Returns the (first) of the last (pair) of the given sequence.

{{{example_start}}} (define a (list 1 2 3 4)) (print (last a)) {{{example_end}}}


append

type
:lambda
arguments
postitional
seq, elem
docu

Appends an element to a sequence, by extendeing the list with (pair elem nil).


>

type
:cfunction
arguments
rest
args
docu

TODO


set!

type
:cfunction
arguments
postitional
sym, val
docu

TODO


create-hash-map

type
:cfunction
arguments
none.
docu

TODO


first

type
:cfunction
arguments
postitional
seq
docu

TODO


show

type
:cfunction
arguments
postitional
n
docu

TODO


macro?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a macro.


procedure?

type
:lambda
arguments
postitional
x
docu
none

member?

type
:lambda
arguments
postitional
elem, seq
docu
none

read

type
:cfunction
arguments
keyword
prompt (">")
docu

TODO


unless

type
:macro
arguments
postitional
condition
rest
body
docu

Special form for when multiple actions should be done if a condition is false.


eval

type
:cfunction
arguments
postitional
expr
docu

TODO


vector

type
:cfunction
arguments
rest
args
docu

TODO


symbol->string

type
:cfunction
arguments
postitional
sym
docu

TODO


map

type
:lambda
arguments
postitional
fun, seq
docu

Takes a function and a sequence as arguments and returns a new sequence which contains the results of using the first sequences elemens as argument to that function.


filter

type
:lambda
arguments
postitional
fun, seq
docu

Takes a function and a sequence as arguments and applies the function to every value in the sequence. If the result of that funciton application returns a truthy value, the original value is added to a list, which in the end is returned.


hash-map-delete!

type
:cfunction
arguments
postitional
hm, key
docu

TODO


mytry

type
:cfunction
arguments
postitional
try_part, catch_part
docu

TODO


string->symbol

type
:cfunction
arguments
postitional
str
docu

TODO


decrement

type
:lambda
arguments
postitional
val
docu

Subtracts one from the argument.


+

type
:cfunction
arguments
rest
args
docu

TODO


lambda

type
:cfunction
arguments
postitional
args
rest
body
docu

TODO


error

type
:cfunction
arguments
postitional
type, message
docu

TODO


case

type
:macro
arguments
postitional
var
rest
clauses
docu
none

continuation?

type
:lambda
arguments
postitional
x
docu

Checks if the argument is a continuation.


and

type
:cfunction
arguments
rest
args
docu

TODO


copy

type
:cfunction
arguments
postitional
obj
docu

TODO


define

type
:cfunction
arguments
postitional
definee
keyword
doc ("")
rest
body
docu

TODO


quasiquote

type
:cfunction
arguments
postitional
expr
docu

TODO


list

type
:cfunction
arguments
rest
args
docu

TODO


import

type
:cfunction
arguments
postitional
f
docu

TODO


ds::alist::make

type
:lambda
arguments
none.
docu
none

ds::alist::print

type
:lambda
arguments
postitional
alist
docu
none

ds::alist::find

type
:lambda
arguments
postitional
alist, key
docu
none

ds::alist::remove!

type
:lambda
arguments
postitional
alist, key
docu
none

ds::alist::set-overwrite!

type
:lambda
arguments
postitional
alist, key, value
docu
none

ds::plist::print

type
:lambda
arguments
postitional
plist
docu
none

ds::plist::find

type
:lambda
arguments
postitional
plist, prop
docu
none

ds::plist::remove!

type
:lambda
arguments
postitional
plist, prop
docu
none

ds::plist::set-overwrite!

type
:lambda
arguments
postitional
plist, prop, value
docu
none

ds::alist::get

type
:lambda
arguments
postitional
alist, key
docu
none

ds::alist::key-exists?

type
:lambda
arguments
postitional
alist, key
docu
none

ds::alist::set!

type
:lambda
arguments
postitional
alist, key, value
docu
none

ds::plist::make

type
:lambda
arguments
none.
docu
none

ds::plist::get

type
:lambda
arguments
postitional
plist, prop
docu
none

ds::plist::prop-exists?

type
:lambda
arguments
postitional
plist, prop
docu
none

ds::plist::set!

type
:lambda
arguments
postitional
plist, prop, value
docu
none

automata::make-dfa

type
:lambda
arguments
postitional
Q, S, delta, q0, F
docu
none

interpolation::lerper

type
:lambda
arguments
postitional
a, b
docu
none

interpolation::point-lerp

type
:lambda
arguments
postitional
p1, p2, t
docu
none

interpolation::bezier2

type
:lambda
arguments
postitional
p1, p2, p3, t
docu
none

interpolation::lerp

type
:lambda
arguments
postitional
a, b, t
docu
none

interpolation::stepped-lerper

type
:lambda
arguments
postitional
a, b, #steps
docu
none

interpolation::point-lerper

type
:lambda
arguments
postitional
p1, p2
docu
none

interpolation::bezierer2

type
:lambda
arguments
postitional
p1, p2, p3
docu
none

define-class

type
:macro
arguments
postitional
name-and-members
rest
body
docu
none

->

type
:macro
arguments
postitional
obj, meth
rest
args
docu
none

math::pi

type
:number
value
3.141593
docu
none

math::abs

type
:lambda
arguments
postitional
x
docu

Accepts one argument and returns the absoulte value of it


math::sqrt

type
:lambda
arguments
postitional
x
docu

Accepts one argument and returns the square root of it


math::make-vector3

type
:lambda
arguments
postitional
x, y, z
docu
none

set::make

type
:lambda
arguments
rest
vals
docu
none

set::find

type
:lambda
arguments
postitional
set, val
docu
none

set::contains?

type
:lambda
arguments
postitional
set, val
docu
none

set::insert!

type
:lambda
arguments
postitional
set, value
docu
none