Comment Comment by hombre_fatal A .match "method" just opens the dam to "why stop there?"I prefer Kotlin's general approach of .let and similar: number = foo.bar().baz().let { match it { A => 1 B => 2 } } Now anyone has the general tool for chaining without needing library authors or language designers to create the API for them. parent hombre_fatal 7 years ago
I prefer Kotlin's general approach of .let and similar:
Now anyone has the general tool for chaining without needing library authors or language designers to create the API for them.