Name

about:api

CLR

add-event-handler import reference

Explicit interfaces

To call a method on an explicit interface, first import the interface, then call the corresponding function in its package.

user 1 > (import "system.collections.ilist")
it: <Package Name="ilist">
user 2 > (ilist:item (vector 'a 'b 'c) 2)
it: c

Conditionals

case case-match cond ecase ecase-match etypecase if if-let if-match typecase when when-let when-match

Math

math:conjugate

The package math replaces the class System.Math and adds support for big integers, rationals and complex numbers.

Functions

about:parameter-lists defmethod defmulti defun defun* lambda lambda* lambda? letfun recur return return-if self tail-recursion

Macros

about:parameters define-compiler-macro define-symbol-macro defmacro let-symbol-macro letmacro

Loops

break break-if continue continue-if finish finish-if foreach loop while

Arrays

as-array create-array

Vectors

as-vector vector

Lists

as-lazy-list as-list caar cadr car cdar cddr cdr cons first last list list* parallel-list rest set-car set-cdr

Sequences

adjoin any? append as-array as-lazy-list as-list as-vector average cat conjoin copy-seq count cycle dedupe distinct drop drop-while each eduction every? except fifth filter filterv find-subsequence-position first first-position flatten fourth group-by index-of interleave interpose intersect iterate keep keep-indexed length map map-indexed mapcat mapv maximize merge merge-by minimize mismatch not-any? not-every? nth parallel-each parallel-map partition partition-all partition-by range reduce reductions remove repeat repeatedly reverse second sequence series shuffle sort sort-by split-at split-with subseq sum take take-nth take-while third transduce union unzip zip

Variables

declare def defconstant defonce defsetf let multiple-let multiple-setf multiple-var psetf psetq set setf setq var

Exception Handling

ignore-errors return-or-throw throw throw-error try try-and-catch using

Input/output

peek-char print read read-all read-all-from-string read-char read-delimited-list read-from-string unread-char with-input-from-string with-output-to-string write write-line write-to-string