11# Active Clojure
22
3+ ## Breaking changes in recent releases
4+
35A library with various basic utilities for programming with Clojure.
46
57[ ![ Clojars Project] ( https://img.shields.io/clojars/v/de.active-group/active-clojure.svg )] ( https://clojars.org/de.active-group/active-clojure )
68[ ![ Actions Status] ( https://github.com/active-group/active-clojure/workflows/ci/badge.svg )] ( https://github.com/active-group/active-clojure/actions )
79[ ![ cljdoc badge] ( https://cljdoc.org/badge/de.active-group/active-clojure )] ( https://cljdoc.org/d/de.active-group/active-clojure/CURRENT )
810
9- ### Breaking changes in version ` 0.40.0 `
11+ ### ` 0.40.0 `
1012
1113- ` active.clojure.monad/run-monadic-swiss-army ` was renamed to
1214 ` active.clojure.monad/run-monadic ` .
1315
14- ### Breaking changes in version ` 0.38 `
16+ ### ` 0.38 `
1517
1618- For an RTD record ` MyRecord ` , ` (MyRecord :meta) ` will no longer
1719 return a meta data map. Use ` (meta #'MyRecord) ` instead.
1820
19- ### Breaking changes since version ` 0.28.0 `
21+ ### Since ` 0.28.0 `
2022
2123- Clojure version 1.9.0 or higher and Clojurescript version 1.9.542 or higher
2224 are required.
@@ -35,9 +37,8 @@ A library with various basic utilities for programming with Clojure.
3537
3638### Records
3739
38- The ` active.clojure.record ` namespace implements a
39- ` define-record-type ` form similar to Scheme's [ SRFI
40- 9] ( http://srfi.schemers.org/srfi-9/ ) .
40+ The ` active.clojure.record ` namespace implements a ` define-record-type ` form
41+ similar to Scheme's [ SRFI 9] ( http://srfi.schemers.org/srfi-9/ ) .
4142
4243Example: A card consists of a number and a color
4344
@@ -63,8 +64,6 @@ Example: A card consists of a number and a color
6364; ; => false
6465```
6566
66- ### Options
67-
6867You can provide additional options in an option-map as second argument to ` define-record-type ` .
6968
7069#### Specs
@@ -128,42 +127,39 @@ provided for the selector functions:
128127
129128#### Non generative option
130129
131- If you provide a value (uid) to the ` nongenerative ` option,
132- the record-creation operation is nongenerative i.e.,
133- a new record type is created only if no previous call to
134- ` define-record-type ` was made with the uid.
135- Otherwise, an error is thrown.
136- If uid is ` true ` , a uuid is created automatically.
137- If this option is not given (or value is falsy),
138- the record-creation operation is generative, i.e.,
139- a new record type is created even if a previous call
140- to ` define-record-type ` was made with the same arguments.
130+ If you provide a value (uid) to the ` nongenerative ` option, the record-creation
131+ operation is nongenerative i.e., a new record type is created only if no
132+ previous call to ` define-record-type ` was made with the uid. Otherwise, an
133+ error is thrown. If uid is ` true ` , a uuid is created automatically. If this
134+ option is not given (or value is falsy), the record-creation operation is
135+ generative, i.e., a new record type is created even if a previous call to
136+ ` define-record-type ` was made with the same arguments.
141137
142138#### Arrow constructor
143139
144140Default is ` true ` .
145141
146- If you provide the key: val pair ` :arrow-constructor? ` :` false ` ,
147- the creation of the arrow-constructor of the ` defrecord ` call is omitted,
148- i.e.
142+ If you provide the key: val pair ` :arrow-constructor? ` :` false ` , the creation of
143+ the arrow constructor of the ` defrecord ` call is omitted, i.e.
149144
150145``` clojure
151146(define-record-type Test {:arrow-constructor? false } (make-test a) ... )
152147```
153- won't yield a function ` ->Test ` .
148+
149+ won't create a function ` ->Test ` .
154150
155151#### Map protocol
156152
157153Default is ` true ` .
158154
159- If you don't want your records to implement the Map- protocols (in * Clojure*
155+ If you don't want your records to implement the Map protocols (in * Clojure*
160156these are ` java.util.Map ` and ` clojure.lang.IPersistentMap ` , in * ClojureScript*
161157` IMap ` and ` IAssociative ` ), you can provide the key: val pair
162158` :map-protocol? ` :` false ` to the options map.
163159
164160#### Remove default interfaces/protocols
165161
166- There are a number of interfaces, that our records defaultly implement (like
162+ There are a number of interfaces, that our records implement by default (like
167163e.g. aforementioned ` java.util.Map ` ). Providing key: val pair
168164` :remove-interfaces ` :` [interface1 interface2 ...] ` will prevent the
169165implementations of the given interfaces.
0 commit comments