We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
optional-lens
clause-lens
1 parent 7153649 commit b035426Copy full SHA for b035426
src/active/clojure/match.clj
@@ -227,6 +227,8 @@
227
(path-matches-clause? clause) path-matches-lens
228
(key-exists-clause? clause) key-exists-lens
229
(path-exists-clause? clause) path-exists-lens
230
+ (optional-clause? clause) (lens/>> optional-clause-clause ((clause-lens key-matches-lens path-matches-lens key-exists-lens path-exists-lens)
231
+ (optional-clause-clause clause)))
232
:else
233
(c/assertion-violation `clause-lens "not a valid clause" clause))))
234
@@ -248,7 +250,7 @@
248
250
249
251
(def path-lens
252
"Returns a function that when applied to a clause, returns a lens focusing on
- the matcher of the clause."
253
+ the path of the clause."
254
(clause-lens key-matches-clause-key
255
path-matches-clause-path
256
key-exists-clause-key
0 commit comments