Otus Lisp (Ol in short) is a purely functional dialect of Lisp.
Ol implements an extended subset of the R7RS Scheme (PDF), including but not limited to some SRFIs. It's tiny (~ 64KB), embeddable, and cross-platform; provides a portable, high level interface to call code written in another language (c, python, lua, etc).
This is an Ol reference, not a Scheme. Scheme R7RS differences described in the DIFFERENCES file.
Examples are provided in two forms:
- in the form of equivalence (in sense of equal?) using symbols "==>" and "===",
(+ 1 2 3) ==> 6
[1 2 3 4] === (make-vector '(1 2 3 4))
- in the interactive form using prompt symbol "> ", which shows the behavior as if someone were typing code in an interactive ol session (REPL).
> #i1.2
1.199999999
> (let ((N 10000))
(define (sign n)
(if (even? n) + -))
(fold (lambda (f x i)
((sign i) f (/ #i4 x)))
#i4
(iota N 3 2)
(iota N 1)))
3.14169264
All provided examples are tested with the Ol's latest build each time the code is submitted to GitHub.
-
Strings, TBD.
-
Control features, TBD.
-
Exceptions, TBD.
-
Input and output, TBD.
-
System interface, TBD.
-
Dictionaries, TBD.
-
Lazy evaluations, TBD.
! | # | 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 |
abs actor actor-linked alist->ff append assq assv assoc async async-linked await await-linked
bytevector bytevector-append bytevector-copy bytevector-copy! bytevector-length bytevector-u8-ref bytevector-u8-set! boolean? boolean=?
c/../ car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr ceiling char? char->integer check-mail complex? cons cons*
decode2 define-instant-macro define-lazy-macro define-macro define-syntax del denominator deserialize digit-value drop
eighth encode2 eq? eqv? equal? even? exact?
fasl-decode fasl-encode ff->alist ff->list ff->pairs ff-diff ff-fold ff-foldr ff-map ff-for-each ff-replace ff-union fifth finite? first floor fold foldr fourth
inexact? infinite? infix-notation integer? integer->char isort iota
length list list? list->ff list->vector list-copy list-ref (lref) list-set! list-tail lrange
m/../ mail make-ff make-list make-bytevector make-vector map max memq memv member mergesort min modulo
nan? natural? negative? ninth not null? number? numerator
pair? pairs->ff positive? put put!
rational? rationalize real? remainder repeat reverse round
s/../ second set-car! set-cdr! seventh serialize sixth sleep sort square sqrt string->regex string->symbol string->uninterned-symbol string->utf8 string->vector symbol? symbol=? symbol->string
vector vector? vector->list vector->string vector-append vector-copy vector-copy! vector-fill! vector-length vector-ref vector-set!