Category | Special form | |||||||||
Format | (lambda formals expr1 expr2 ...) | |||||||||
Parameters |
|
|||||||||
Description | lambda creates a procedure (or lexical closure)
defined by
| |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||||||||||
Format | (launch [creator]) | ||||||||||||||
Parameters |
|
||||||||||||||
Description | launch searches the Palm application with creator
creator and starts it. When LispMe is re-entered
later, the current program is still running, so that execution
continues after this procedure. When creator is
omitted, the active application launcher is started and the
current LispMe program is terminated, so you can use this variant
to quit a LispMe app.
The return value is creator.
The creator is written as a string of 4 bytes,
which is more readable than the Pilot API convention which
builds a 32-bit integer from the 4 bytes. The ids for the builtin
applications are (please note that case is significant)
|
||||||||||||||
R4RS Compliance | LispMe extension. | ||||||||||||||
Examples |
|
Category | Native procedure | |||||||||
Format | (length list) | |||||||||
Parameters |
|
|||||||||
Description | length returns the number of elements in list. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Special form | |||||||||
Format | (let [name] ((var form) ...) expr1 expr2 ...) | |||||||||
Parameters |
|
|||||||||
Description | let is a binding form, which extends the lexical
environment by the bindings in its head and evaluates its body
forms in the extended environment.
When name is specified, a recursive function named name is created and called with the initial formi. |
|||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Special form (compiler extension) | ||||||
Format | (let* ((var form) ...) expr1 expr2 ...) | ||||||
Parameters |
|
||||||
Description | let* is a binding form, which extends the lexical
environment by the bindings in its head and evaluates its body
forms in the extended environment.
| ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Special form | ||||||
Format | (letrec ((var form) ...) expr1 expr2 ...) | ||||||
Parameters |
|
||||||
Description | letrec is a binding form, which extends the lexical
environment by the bindings in its head and evaluates its body
forms in the extended environment. In contrast to
let, each
vari is in scope while
formj is evaluated, so mutual recursive
definitions are possible.
| ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (list obj1 ...) | |||||||||
Parameters |
|
|||||||||
Description | list gathers its arguments into a proper list and returns it. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Native procedure | |||||||||
Format | (list* obj1 obj2 ...) | |||||||||
Parameters |
|
|||||||||
Description | list* gathers its arguments into a (possibly improper) list and returns it. The list is improper if the last argument is not a list. | |||||||||
R4RS Compliance | LispMe extension | |||||||||
Examples |
|
Category | Native procedure | |||||||||
Format | (list->string charlist) | |||||||||
Parameters |
|
|||||||||
Description | list->string returns a newly allocated string consisting of the characters in charlist. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (list->vector list) | ||||||
Parameters |
|
||||||
Description | list->vector returns a newly allocated vector consisting of the elements of list. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (list-ref list index) | ||||||
Parameters |
|
||||||
Description | list-ref returns the indexth element of list. The index of the first element is 0, and the index of the last element is the length of list minus one. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (list-tail list index) | ||||||
Parameters |
|
||||||
Description | list-tail returns the indexth
pair of list. The index of the first
element is 0, and the index of the last element is the
length of list minus one. The pair returned
is not a copy and may be modified with set-car! etc. For all valid indexes, the equation (list-ref lst n) = (car (list-tail lst n)) holds. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (list? obj) | |||||||||
Parameters |
|
|||||||||
Description | list? returns #t for proper list and #f for any other object. A proper list is either the empty list or a pair of any object and a (different) proper list and thus never contains a cycle. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure (MathLib required) | |||||||||
Format | (log z) | |||||||||
Parameters |
|
|||||||||
Description | log returns its natural logarithm of z. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Library procedure (MathLib required) | ||||||
Format | (log10 z) | ||||||
Parameters |
|
||||||
Description | log10 returns the logarithm to base 10 of z. | ||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (lookup-host host) | |||
Parameters |
|
|||
Description | lookup-host tries to resolve the symbolic hostname host via the DNS configured for the Palm's IP connection and returns the numeric address as a string in the standard form "n1.n2.n3.n4". If host is already a numeric IP address, it is returned unchanged. If the address cannot be resolved, #f is returned. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | UI event | ||||
Format | (lst-enter id sel) | ||||
Parameters |
|
||||
Description | lst-enter is the event posted when the user has tapped a list but not yet lifted the pen. |
Category | Native procedure | |||
Format | (lst-get-sel id) | |||
Parameters |
|
|||
Description | lst-get-sel returns the zero-based index of the selected item in a user interface list. If no item is selected, #f is returned. The list is identified by its id. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||
Format | (lst-get-text id item) | ||||
Parameters |
|
||||
Description | lst-get-text returns the text of the item with zero-based index sel in the user interface list with id id as a string. If the specified item doesn't exist in the list, "" (the empty string) is returned. | ||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | UI event | ||||
Format | (lst-select id sel) | ||||
Parameters |
|
||||
Description | lst-select is the event posted when the user has selected an item in a list. |
Category | Native procedure | ||||
Format | (lst-set-list id items) | ||||
Parameters |
|
||||
Description | If items is a list, lst-set-list prints each item in items using the formatting conventions of display and fills a user interface list with the strings obtained. Beginning with V3.1, any number of user-filled lists are allowed, since the items are now stored as the foreign type string array and memory management includes UI form data. A string array may also be specified for items The return value is items. | ||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | ||||
Format | (lst-set-sel id sel) | ||||
Parameters |
|
||||
Description | lst-set-sel selects an item in a user interface list. The list is identified by its id and the item by sel, which may be either a zero-based index or the value #f meaning deselection of any item. The return value is sel. | ||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Back to index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other