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:
(+ 1 2 3) ==> 6
[1 2 3 4] === (make-vector '(1 2 3 4))
> #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!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。