1. List Functions
Form | Description | Examples |
---|---|---|
( |
Return the first element contained in lst. If lst is empty, return |
|
( |
Return a new list with all the elements of lst except the first one. If lst is empty, return the empty list. |
|
( |
Return a new list where x is the first element and lst is the rest. |
|
( |
Return |
|
( |
Return the number of elements in lst. A nested list counts as one element. |
|
2. Special Forms
Form | Description | Examples |
---|---|---|
( |
Binding definition: Define a new global binding called name, bound to value. |
|
( |
Function definition: Define a new global function called name with a docstring, the specified (possibly zero) parameters, and the given body. |
|
( |
Condition: If test expression evaluates to a non-falsy value, evaluate and return the then expression. Otherwise, evaluate and return the else expression. Falsy values are: |
|