COMMON-IDIOMS package

Name

COMMON-IDIOMS package -- Exports/uses/nicknames/etc

Description

[No description in DEFPACKAGE]

Exports

AIFAIF2
DESTRUCTURING-CASEEXPAND-ONLY
FCONSTANTLYIT
LET-ENVLET-ENV*
MACROEXPAND-NMACROLET*
MAP1REDUCEN
RUN-TESTSSETF-IT
SIFSYMBOLIC
WITH-GENSYMS 

Uses

COMMON-LISP

Package Content

Methods

AIF
 (AIF TEST CONSEQ &OPTIONAL (ELSE NIL)) [macro]
Description 

Anaphoric if macro, binds IT to the value of TEST during the execution of CONSEQ, and SETF-IT to a macro which SETFs TEST to its argument during the execution of ELSE.

Location 

common-idioms.lisp

AIF2
 (AIF2 TEST CONSEQ &OPTIONAL (ELSE NIL)) [macro]
Description 

Anaphoric if macro on the second value of TEST; binds IT to the first value of evaluating TEST during the execution of CONSEQ, and SETF-IT to a macro which SETFs TEST to its argument during the execution of ELSE.

Location 

common-idioms.lisp

DESTRUCTURING-CASE
 (DESTRUCTURING-CASE NEXT-CASE-TAG LITERALS CASES EXPR ELSE-CLAUSE) [macro]
Description 

Case macro for multiple possible ways to destructure EXPR. CASES has the form ((LAMBDA-LIST CONSEQ)*), where LAMBDA-LIST is a destructuring lambda list. Any parameters in LITERALS present in a LAMBDA-LIST will be matched literally (with EQL). NEXT-CASE-TAG will be visible as a GO tag which continues the CASE expression at the next possible destructuring lambda list. If a lambda list matches, the result will be that of evaluating its corresponding CONSEQ; else it will be the result of evaluating ELSE-CLAUSE.

Called By 

TEST-DESTRUCTURING-CASE

Location 

destructuring-case.lisp

EXPAND-ONLY
 (EXPAND-ONLY NAMES EXPR) [function]
Description 

Unportable common-lisp function which globally expands every occurance of the macros named in NAMES in EXPR. If NAMES is t, expand every macro. Returns two values: EXPR with macros substituted, and an alist of (form . expansion) for expanded forms which could not be found in EXPR (occurs often with setf).

Location 

common-idioms.lisp

FCONSTANTLY
 (FCONSTANTLY FUNCTION) [macro]
Description 

Returns a function of any arguments which always evaluatues to the result of calling (APPLY FUNCTION ARGUMENTS).

Called By 

REDUCEN

Location 

common-idioms.lisp

LET-ENV
 (LET-ENV ENAME) [macro]
Description 

Binds ENAME to a macro which retrieves the value of variables from the current environment. ENAME has the form (ENAME (VAR ...) BODY ...), where each VAR refers to the current scope (and not any shadows).

Location 

bend-lexical.lisp

LET-ENV*
 (LET-ENV* ENAME VARS) [macro]
Description 

Capture the given VARS from the current environment, and make ENAME available as a macro which executes its arguments as an implicit PROGN in an environment where VARS have their bindings at the point of LET-ENV*.

Location 

macroletstar.lisp

MACROEXPAND-N
 (MACROEXPAND-N N FORM) [macro]
Description 

MACROEXPAND-1 FORM recursively N times.

Location 

common-idioms.lisp

MACROLET*
 (MACROLET* CAPTURED-VARS MACRO-FORMS) [macro]
Description 

By-hand referentially transparent macrolet. Supply a first argument of the variables that you wish to capture.

Location 

macroletstar.lisp

MAP1
 (MAP1 FUNCTION LIST) [macro]
Description 

map through the list, collecting the result of calling FUNCTION with each successive element of LIST and all of the CONSTANT-PARAMS (not evaluated at macroexpansion time)

Called By 

DESTRUCTURING-CASE and WITH-GENSYMS

Location 

common-idioms.lisp

REDUCEN
 (REDUCEN N FN L) [macro]
Description 

Multiple value REDUCE macro - REDUCE over L, calling FN with N+1 arguments and expecting N return values. The initial values for these are supplied in INITIALS.

Location 

common-idioms.lisp

RUN-TESTS
 (RUN-TESTS) [macro]
Description 

Run the functions named by the supplied TESTS (not evaluated), printing and collecting their values.

Location 

common-idioms.lisp

SIF
 (SIF TEST CONSEQ &OPTIONAL ELSE) [macro]
Description 

Symbolic IF - equivalent to (SYMBOLIC IF TEST CONSEQ ELSE)

Location 

sif.lisp

SYMBOLIC
 (SYMBOLIC OPERATION FIRST-ARG) [macro]
Description 

Binds the symbol "it" to a symbol-macro expanding to FIRST-ARG during the execution of (OPERATION FIRST-ARG REST-ARGS...). This symbol macro can be used with SETF.

Location 

sif.lisp

WITH-GENSYMS
 (WITH-GENSYMS NAMES) [macro]
Description 

Binds NAMES to gensyms during the execution of BODY.

Called By 

AIF2, DESTRUCTURING-CASE, EXPAND-ONLY, LET-ENV, LET-ENV*, MACROLET*, REDUCEN, RUN-TESTS, SYMBOLIC, WITH-VARS and WITH-VARS

Location 

common-idioms.lisp

This documentation was generated 17 Apr 2004 from the original sources by Albert v.0.4.9.