Skip to content

Commit 2509bd4

Browse files
committed
Documentation fixes.
1 parent b373bb1 commit 2509bd4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ A minimalist data driven data model library, inspired by [Clojure Spec](https://
1313
- support recursive definitions and sequence regex,
1414
- no macro, no static registry, pure functions,
1515
- relatively simple implementation, easy to read and modify,
16-
- cross platform (`.cljc`)
16+
- cross platform (`.cljc`),
17+
- `valid?` runs in [Babashka](https://github.com/borkdude/babashka)
1718

1819
## Non-goals (for now)
1920

2021
- does not integrate with anything else,
21-
- does not try hard to be performant,
22+
- does not try hard to be performant
2223

2324
## Usage
2425

doc/model_builder.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Represents a value which belongs to a set of pre-defined values.
7575

7676
### And / Or
7777

78-
Data model used for validation using conjunction or disjunctions of
78+
Data model used for validation using conjunctions or disjunctions of
7979
other logical predicates.
8080

8181
```clojure
@@ -85,9 +85,10 @@ other logical predicates.
8585
```
8686

8787
Those models are not supported by Minimallist's generator. If you want to use it
88-
outside of a `:condition-model` field, you need to add your own generator to their nodes
88+
outside of a `:condition-model` field, you need to add your own generator to their nodes.
8989

9090
```clojure
91+
;; Minimallist's generator can use this model to generate data.
9192
(-> (h/or (h/fn #(<= 0 % 9))
9293
(h/val 42))
9394
(h/with-test-check-gen (tcg/one-of [(tcg/choose 0 9)
@@ -103,21 +104,21 @@ outside of a `:condition-model` field, you need to add your own generator to the
103104
(h/set-of (fn keyword?))
104105

105106
;; Persons by name.
106-
(h/map-of (fn/string?) (ref 'person))
107+
(h/map-of (h/fn string?) (ref 'person))
107108

108109
;; Sequence of numbers, either in a list or in a vector.
109-
(h/sequence-of (fn/int?))
110+
(h/sequence-of (h/fn int?))
110111
```
111112

112113
`list-of` and `vector-of` are shortcuts to define at the same time a `:sequence-of` node
113114
with a `:coll-type` set to `:list` or `:vector`.
114115

115116
```clojure
116117
;; A list of numbers.
117-
(h/list-of (fn/int?))
118+
(h/list-of (h/fn int?))
118119

119120
;; A vector of numbers.
120-
(h/sequence-of (fn/int?))
121+
(h/sequence-of (h/fn int?))
121122
```
122123

123124
### Collections with entries

0 commit comments

Comments
 (0)