Comparison operators < <= > >= work with numbers, chars and strings, there are no separate comparison functions for them.
#f | #t | < | <= |
> | >= | and | boolean? |
case | cond | eq? | eqv? |
equal? | if | not | or |
eq? | gensym | symbol? |
Integer numbers are represented internally as unboxed data, so they can be compared with eq?. Use eqv? to compare arbitrary numbers.
Invalid operations with floating points do not abort the evaluation, but result in special IEEE-defined values infinity, -infinity and not-a-number (or may return complex results!), which print like this. The only exception is division by zero, which always causes an error to be consistent with integer division.
The exactness property of Scheme is not supported, all numbers are considered inexact?.
Additionally, LispMe supports bitwise operations on 15 bit signed integers.
LispMe doesn't support R4RS procedures char<? etc. but extends the numeric comparison operators < <= > >= to work with characters, too. The ordering defined by these operators is the ordering of the corresponding ASCII codes.
To compare for equal characters, use eq?.
< | <= | > | >= | char->integer |
char? | eq? | integer->char | max | min |
LispMe doesn't support R4RS procedures string<? etc. but extends the numeric comparison operators < <= > >= to work with strings, too. The ordering defined by these operators is the lexicographic extension of the ordering of the underlying characters.
To compare for equal strings, use string=?, as eqv? is required to distinguish non-shared strings.
In LispMe equal written strings (including the empty string) are never shared.
The printing and scanning procedures object->string and string->object use an internal buffer which is limited to 4096 characters.
< | <= | > | >= | list->string |
max | make-string | min | object->string | string->list |
string->object | string-append | string-length | string-ref | string-set! |
string=? | string? | substring |
Lists are structures built from pairs where every cdr component is either a pair or the special object '() called the empty list.
'() | append | assoc | assq | assv |
c...r | car | cdr | cons | equal? |
length | list | list->string | list-ref | map |
member | memq | memv | memv | null? |
pair? | reverse | set-car! | set-cdr! | string->list |
list->vector | make-vector | vector | vector->list |
vector-length | vector-ref | vector-set! | vector? |
Closures have no sensible written representation, see here how they are printed.
Additionally, LispMe provides the meta-linguistic function eval, which interprets an expression as LispMe code.
apply | disasm | eval | for-each |
lambda | map | procedure? |
A continuation object can be created by the call/cc procedure, which expects a procedure of one argument. This procedure will be called with the current continuation as its parameter. This continuation looks like a procedure of one argument, but any time it is called afterwards, the argument will be the return value of the original call/cc application.
Continuations are a powerful control mechanism and can be used to implement non-local returns, exception handling, backtracking, or coroutines.
Continuations have no sensible written representation, see here how they are printed.
call/cc | continuation? |
Promises have no sensible written representation, see here how they are printed.
delay | force | promise? |
You can open an existing memo for reading with open-input-file, which returns an input port to be used with read, read-char, read-line, or peek-char. It's possible to open several input ports for the same memo; each port maintains its own read position.
LispMe ports don't need to be closed, so there are no procedures close-input-port or close-output-port. Additionally, MemoPad IO is quite robust, you can even delete a memo while a port is open without risking crashes!
LispMe provides other procedures, which read input from popup dialogs (the parameter is displayed as a prompt text in each case) and write output to the output field.
LispMe supports reading and writing arbitrary databases from other applications using the
*gstate* | bitmap | draw | index->rgb |
rect | rgb->index | set-palette | text |
hb-addrecord | hb-dir | hb-info | hb-getfield | hb-getlinks | hb-setfield |