FundingCircle / jackdaw

A Clojure library for the Apache Kafka distributed streaming platform.
https://fundingcircle.github.io/jackdaw/
BSD 3-Clause "New" or "Revised" License
369 stars 80 forks source link

Add jackdaw.streams/split? #232

Closed AlexVPopov closed 4 years ago

AlexVPopov commented 4 years ago

Would it make sense to add:

(jackdaw.streams/split kstream pred-fn)

which is essentially:

(jackdaw.streams/branch kstream [pred-fn (complement pred-fn)])

or is this case too trivial?

minimal commented 4 years ago

branch already splits the stream so it's also the equivalent of (jackdaw.streams/branch kstream [pred-fn any?])

AlexVPopov commented 4 years ago

O.K., I see. I find js/splt version a bit more expressive, but on the other hand any? is also pretty straightforward 👍