Scheme for Common Lisp programmers

What’s the point?

Common Lisp is a maximalist language.

Numbers

Boolean

t nil

#t #f

Lists

'()

Sequences

Standard Scheme has generic number handling, but not generic sequence handling. Lists, vectors, bytevectors, and strings all have a separate set of procedures to deal with them. (Schemers call these procedures monomorphic, as opposed to polymorphic.)

Characters and strings

A string is a sequence of characters. Since R6RS, a character is a Unicode codepoint.

Scheme has standard string→utf8 and utf8→string procedures to Since R6RS, strings are Unicode stringsconvert between strings and Since R6RS, strings are Unicode stringsbytevectors. These make copies.

Procedures

Loops

Global and dynamic variables

Where is …​?

Format — SRFI

Loop macro — N/A, but check out foof-loop

Packages — Standard Scheme calls them "libraries". A few Scheme implementations still talk about "modules", which is a synonym for library.

Compile — Some Scheme implementations (Chez, MIT) only use an incremental compiler so everything you type into the REPL is implicitly compiled as if you loaded it from a file. Others compile Scheme to C, which the C compiler then turns into a shared library. These shared librarie can be loaded in to the interpreter.

Keywords — Standard Scheme has neither keyword objects nor keyword arguments. However, many implementations do, and it’s likely they will be added to a future standard.

Hash tables — Almost every Scheme implementation has them. R6RS has standard hash tables. Also SRFIs.

Sorting — SRFI

Bitwise operations — SRFI

Fixnums — R6RS

Quicklisp — Akku

Readtables — Not available

Customizable printer — Not standardized; check the manual for your implementation.

Arrays — SRFI

Bitvectors — SRFI

Contributing

doc.scheme.org is a community subdomain of scheme.org.