onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
danielcompton 2017-12-13T00:28:58.000079Z

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?

danielcompton 2017-12-13T00:29:30.000046Z

or is it more of a branching matcher?

danielcompton 2017-12-13T00:29:59.000236Z

i.e.

(-&gt; (new-pattern-sequence "test")
    (begin "matches-a" (fn [event &amp; context] (= event "a")))
    (followed-by-any "any" (constantly true)))

=&gt; [["a" "b"] ["a" "c"] ["a" "d"]]

michaeldrogalis 2017-12-13T00:42:58.000146Z

That's correct - it keeps it available for future matches.

michaeldrogalis 2017-12-13T00:43:11.000063Z

Both things you said are correct - it's described as a branching primitive.

michaeldrogalis 2017-12-13T00:43:39.000312Z

Highly recommend reading through Metamorphic's tests by the way.

michaeldrogalis 2017-12-13T00:43:45.000046Z

There's tons of examples.