Next: , Previous: Package FL.UTILITIES, Up: Reference manual


7.2 Package FL.MACROS

This package contains some basic macro definitions used in Femlisp.

— Macro: ?1 &REST ARGS

A macro returning the first of its arguments.

— Macro: ?2 &REST ARGS

A macro returning the second of its arguments.

— Macro: ?3 &REST ARGS

A macro returning the third of its arguments.

— Macro: ?4 &REST ARGS

A macro returning the fourth of its arguments.

— Macro: ?5 &REST ARGS

A macro returning the fifth of its arguments.

— Macro: ?6 &REST ARGS

A macro returning the sixth of its arguments.

— Macro: AAND &REST ARGS

Anaphoric macro from (Graham 1993).

— Macro: ACOND &REST CLAUSES

Anaphoric macro from (Graham 1993).

— Macro: AWHEN TEST-FORM &BODY BODY

Anaphoric macro from (Graham 1993).

— Macro: BIF (BINDVAR BOUNDFORM) YUP &OPTIONAL NOPE

Posted to cll by Kenny Tilton 22.4.2007.

— Macro: CHAIN ARG &BODY CLAUSES

Anaphoric macro on the symbol _ which allows to express a chain of operations.

— Macro: DEFINLINE NAME &REST REST

Short form for defining an inlined function. It should probably be deprecated, because it won't be recognized by default by some IDEs. Better use the inlining macro directly.

— Macro: DELAY FORM

Delays the evaluation of form.

— Macro: DELETEF ITEM SEQUENCE &REST ARGS

Delets item from sequence destructively.

— Macro: ECHO EKX-ID &REST BODY

Posted to cll at 17.10.2006 by Kenny Tilton.

— Macro: ENSURE PLACE &REST ARGS &ENVIRONMENT ENV

Ensures that some place is set. It expands as follows:

            (ensure place value) ==> (or place (setf place value))

It is not clear if the implementation used here works everywhere. If not, the workaround below should be used.

— Macro: FLUID-LET BINDINGS &BODY BODY

Sets temporary bindings.

— Function: FORCE OBJ

Force a delayed object.

— Macro: GENCASE OBJ TEST &BODY CLAUSES

An analog to case using test as comparison.

— Macro: INLINING &REST DEFINITIONS

Declaims the following definitions inline together with executing them.

— Macro: LRET BINDINGS &BODY BODY

A let-construct which returns its last binding.

— Macro: LRET* BINDINGS &BODY BODY

A let*-construct which returns its last binding.

— Macro: MULTI-FOR (VAR START STOP) &BODY BODY

Loops for var being an integer vector starting from start upto end. Example:

            (multi-for (x #(1 1) #(3 3)) (princ x) (terpri))

— Macro: NAMED-LET NAME BINDINGS &BODY BODY

Implements the named-let construct from Scheme.

— Macro: REMOVE-THIS-METHOD GF-NAME &REST REST

Removes the method for the generic function gf-name which is specified by qualifiers and specializers. Example:

            (remove-this-method m* :before ((mat <matrix>) (x <vector>)))

It should be possible to use this directly on a copied first line of a DEFMETHOD definition.

— Macro: SHOW-CALL FUNC &OPTIONAL NAME

Wraps a function object inside a trace form.

— Macro: STRINGCASE STRING &BODY CLAUSES

An analog to case using string comparison.

— Macro: SYMBOL-MACROLETF (&REST BINDINGS) &BODY BODY &ENVIRONMENT ENVIRONMENT

Like SYMBOL-MACROLET but evaluate subforms just once up front.

— Function: SYMCONC &REST ARGS

This function builds a symbol from its arguments and interns it. This is used in some macros.

— Macro: WHEREAS CLAUSES &REST BODY

Own implementation of the macro whereas suggested by Erik Naggum (c.l.l., 4.12.2002).

— Macro: WITH-ARRAYS SYMS &BODY BODY

Improved version of a macro posted in cll by ?. A similar but more restricted macro was posted by KMP at 8.5.2007 under the name 'array-access'.

— Macro: WITH-GENSYMS SYMS &BODY BODY

Standard macro providing the freshly generated symbols syms to the code in body.

— Macro: _ &BODY BODY

Easy definition of anonymous small functions. Arguments are '_', '_1', ..., '_5'.

— Macro: _F OP PLACE &REST ARGS

Macro from (Graham 1993). Turns the operator op into a modifying form, e.g. (_f + a b) == (incf a b).