Hello everyone, how do I convert ```KStream<Str...
# announcements
a
Hello everyone, how do I convert
Copy code
KStream<String, Long>[] branches = stream.branch(
    (key, value) -> key.startsWith("A"), /* first predicate  */
    (key, value) -> key.startsWith("B"), /* second predicate */
    (key, value) -> true                 /* third predicate  */
  );
to kotlin? I've tried with
Copy code
val branchedStream = metricStream.branch(
                { k: String, v: MetricWithTimestamp -> v.getType().equals("diagnostic") },
                { k: String, v: MetricWithTimestamp -> true }
        )
but I'm getting
Copy code
Error:(91, 17) Kotlin: Type mismatch: inferred type is (???, ???) -> [ERROR : <ERROR FUNCTION RETURN TYPE>] but Predicate<in String!, in MetricWithTimestamp!>! was expected
even trying with typed arguments I get:
Copy code
Error:(91, 17) Kotlin: Type mismatch: inferred type is (String, MetricWithTimestamp) -> Boolean but Predicate<in String!, in MetricWithTimestamp!>! was expected
any idea?