Comments (1)
I tried to come up with something more understandable. How is this?
(defmacro cardinality-case (cardinality &body clauses)
"Execute the clause in CLAUSES which corresponds to the value of
CARDINALITY.
CARDINALITY is evaluated and the resulting value is used to select
a clause.
Elements of CLAUSES are of the form
(CARDINALITY-DESIGNATOR-OR-LIST &body BODY)
where CARDINALITY-DESIGNATOR-OR-LIST is either
1. One of the cardinality designators 1, ?, *, `:map'
A clause of this form matches if CARDINALITY evaluates to the
specified cardinality designator or if CARDINALITY evaluates
to (:map SOME-KEY) and CARDINALITY-DESIGNATOR-OR-LIST is `:map'.
2. A list of some of the cardinality designators mentioned above
A clause of this form matches if CARDINALITY evaluates to any of
the cardinality designators mentioned in
CARDINALITY-DESIGNATOR-OR-LIST or if CARDINALITY evaluates
to (:map SOME-KEY) and `:map' is an element of
CARDINALITY-DESIGNATOR-OR-LIST.
3. An expression of the form (:map KEY-VAR)
A clause of this form matches if the value of CARDINALITY is of
the form (:map SOME-KEY). During the evaluation of the BODY of
the clause, KEY-VAR will be bound to SOME-KEY."
(expand-cardinality-case cardinality clauses nil))
from architecture.builder-protocol.
Related Issues (11)
- Incorrect indentation of class-initarg-and-relation-slots HOT 2
- Definition of relation-slot? looks very strange. HOT 2
- Maybe do not use &REST as a lexical variable
- Improve documentation string for generic function FINISH
- In make-keyword-argument, handle base cases first
- Starting ASDF system definitions by (in-package #:asdf-user) HOT 2
- Iterative version of make-keyword-arguments HOT 2
- Improve comment for make-keyword-arguments
- Hard to parse phrase in the documentation string of add-relations.
- Incorrect indentation in add-relations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from architecture.builder-protocol.