| function name | description |
|---|---|
| cons | construct a list by creating a new one with the supplied head and tail |
| headOf | return the first item in the list |
| tailOf | return a list of all items excluding the first in the supplied list |
| list | create a list out of the arguments |
Construct a list by creating a new one with the supplied head and tail.
Arguments:
| newHead | Object |
| newTail | List |
Return type: List
Examples:
(cons 1 (list 1 2 3)) --> (1 2 3 4)
Return the first item in the list. An error is thrown if attempt to take the head of an empty list.
Arguments:
| list | List |
Return type: Object
Examples:
(headOf (list 1 2 3)) --> 1
Return a list of all items excluding the first in the supplied list.
Arguments:
| list | List |
Return type: List
Examples:
(headOf (list 1 2 3)) --> (2 3)
Create a list out of the arguments.
Arguments:
Multiple arguments which can be of any type.
Return type: List
Examples:
(list 1 2 3 "four" (quote five) 0x"06") --> (1 2 3 "four" five 0x"06")
| Contents | Index | Current topic: functions | Related topics: objects |