Next: , Previous: , Up: Reference manual   [Contents][Index]


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: 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: 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 NEWVAL

Essentially (or place (setf place newval)). Posted by Erling Alf to c.l.l. on 11.8.2004, implementing an idea of myself posted on c.l.l. on 30 Jul 2004 in a probably more ANSI conforming way.

Macro: FLUID-LET BINDINGS &BODY BODY

Sets temporary bindings.

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-DOTIMES (VAR STOP) &BODY BODY

Special case of multi-for. Loops starting from a zero-vector to stop. Examples:

  (multi-dotimes (x #(3 3)) (princ x) (terpri))
Macro: MULTI-FOR (VAR START STOP &KEY FROM-END) &BODY BODY

Loops for var being an integer vector starting from start upto stop. Examples:

  (multi-for (x #(1 1) #(3 3)) (princ x) (terpri))
  (multi-for (x #(1 1) #(3 3) :from-end t) (princ x) (terpri))
Macro: MULTIPLE-DEFGEN NAMES ARGS

Defines multiple generic functions at once. Usually, this will only be used for helper functions.

Macro: NAMED-LET NAME BINDINGS &BODY BODY

Implements the named-let construct from Scheme.

Macro: ONCE-ONLY VARIABLES &REST BODY

Slightly modified macro taken from <http://groups.google.com/comp.lang.lisp/msg/2a92ad69a8185866>.

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

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 &BODY 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).


Next: , Previous: , Up: Reference manual   [Contents][Index]