nth function added to stdlib, doc updates
This commit is contained in:
16
doc/Doc.md
16
doc/Doc.md
@@ -34,16 +34,18 @@
|
||||
|`(remove list index)`|Remove a value at an index from a list|List with element removed|
|
||||
|`(len list)`|Get the length of a list|list length|
|
||||
|`(push list element)`|Add an item to the end of a list|new list with element added|
|
||||
|`(pop ..)`|||
|
||||
|`(pop list)`|Returns last element of list|Last element|
|
||||
|`(head list)`|Returns first element of a list|First element|
|
||||
|`(tail list)`|Return all elements of list except first one|List without first element|
|
||||
|`(first ..)`|||
|
||||
|`(last ..)`|||
|
||||
|`(range ..)`|||
|
||||
|`(first list)`|Returns first element of a list|First element|
|
||||
|`(last list)`|Returns last element of list|Last element|
|
||||
|`(range low high)`|Returns list with elements in range low .. high|`(range 1 5) => (1 2 3 4)`|
|
||||
|`(member list item)`|||
|
||||
|`(map ..)`|||
|
||||
|`(filter ..)`|`(filter (lambda (x) (> x 2)) '(1 2 3 4 5)) => (3 4 5)`||
|
||||
|`(reduce ..)`|||
|
||||
|`(make-list len)`|Return list with len nil elements|`(make-list 3) => (nil nil nil)`|
|
||||
|`(make-list-of len value)`|||
|
||||
|`(map ..)`||`(map (lambda (x) (+ x 10)) '(1 2 3 4 5 6)) => (11 12 13 14 15 16)`|
|
||||
|`(filter lambda list)`||`(filter (lambda (x) (> x 2)) '(1 2 3 4 5)) => (3 4 5)`|
|
||||
|`(reduce lambda acumulator list)`||`>>> (reduce (lambda (x y) (+ (* x 10) y)) 0 '(1 2 3 4)) => 1234`|
|
||||
|`(exit ..)`|||
|
||||
|`(quit ..)`|||
|
||||
|`(print ..)`|||
|
||||
|
||||
Reference in New Issue
Block a user