File: README.md

package info (click to toggle)
cl-anaphora 20190828.git018590d-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 104 kB
  • sloc: lisp: 596; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,569 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Anaphora

Anaphora is the anaphoric macro collection from Hell: it includes many
new fiends in addition to old friends like `AIF` and `AWHEN`.
Anaphora has been placed in Public Domain by the author, [Nikodemus
Siivola](mailto:nikodemus@random-state.net).

# Installation

Use [quicklisp](http://www.quicklisp.org/), and simply:

```
CL-USER(1): (ql:quickload "anaphora")
```

# Documentation

Anaphoric macros provide implicit bindings for various
operations. Extensive use of anaphoric macros is not good style,
and probably makes you go blind as well — there's a reason why
Anaphora claims to be from Hell.

Anaphora provides two families of anaphoric macros, which can be
identified by their names and packages (both families are also
exported from the package `ANAPHORA`). The implicitly-bound symbol
`ANAPHORA:IT` is also exported from all three packages.

## Basic anaphora

#### Exported from package `ANAPHORA-BASIC`

These bind their first argument to `IT` via `LET`. In case of `COND`
all clauses have their test-values bound to `IT`.

Variants: `AAND`, `ALET`, `APROG1`, `AIF`, `ACOND`, `AWHEN`, `ACASE`,
`ACCASE`, `AECASE`, `ATYPECASE`, `ACTYPECASE`, and `AETYPECASE`.

## Symbol-macro anaphora

#### Exported from package `ANAPHORA-SYMBOL`

These bind their first argument (unevaluated) to `IT` via
SYMBOL-`MACROLET.`

Variants: `SOR`, `SLET`, `SIF`, `SCOND`, `SUNLESS`,
`SWHEN`, `SCASE`, `SCCASE`, `SECASE`, `STYPECASE`, `SCTYPECASE`,
`SETYPECASE`.

Also: `ASIF`, which binds via `LET` for the
then-clause, and `SYMBOL-MACROLET` for the else-clause.