This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-13
Channels
- # adventofcode (77)
- # beginners (132)
- # boot (11)
- # cider (40)
- # clara (10)
- # cljsjs (1)
- # cljsrn (4)
- # clojure (148)
- # clojure-android (1)
- # clojure-greece (5)
- # clojure-italy (5)
- # clojure-nl (7)
- # clojure-spec (57)
- # clojure-uk (9)
- # clojurescript (115)
- # core-matrix (1)
- # cursive (3)
- # data-science (1)
- # datomic (1)
- # duct (7)
- # emacs (20)
- # fulcro (29)
- # funcool (4)
- # graphql (31)
- # instaparse (15)
- # java (1)
- # jobs (6)
- # jobs-discuss (95)
- # leiningen (2)
- # off-topic (30)
- # om (4)
- # onyx (7)
- # pedestal (6)
- # quil (4)
- # re-frame (52)
- # reagent (59)
- # rum (1)
- # spacemacs (3)
- # specter (61)
- # test-check (3)
I'm trying to understand followed-by-any
. Reading the docs, it seems like it allows a match, but also keeps that event available for other matches?
or is it more of a branching matcher?
i.e.
(-> (new-pattern-sequence "test")
(begin "matches-a" (fn [event & context] (= event "a")))
(followed-by-any "any" (constantly true)))
=> [["a" "b"] ["a" "c"] ["a" "d"]]
That's correct - it keeps it available for future matches.
Both things you said are correct - it's described as a branching primitive.
Highly recommend reading through Metamorphic's tests by the way.
There's tons of examples.