aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/general/table.texi
blob: 69bb839fe911f25c1632a90c8083ce37e8387c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@node Table
@section Table

An immutable table, where all operations on the table return a new
table with the wanted changes carried out. All keys @emph{must} be
symbols.

@defun table
Constructs a new empty table.
@end defun

@defun table? x
Is @var{x} a table?
@end defun

@defun table-get table key [default=#f]
Retrive value form table, returns @var{default} if key isn't in the
table.
@end defun

@defun table-put table key value
Insert new value into table, overwriting anything previously stored
under that key. Returns a new table with the values set.
@end defun

@defun table-remove table key
Returns a new table with @var{key} removed.
@end defun

@defun table->list table
Return an association list with the same content as the table.

The keys will be sorted.
@end defun

@defun alist->table alist
Construct a new table from the given alist.
@end defun