I found a
great repository of functional Kotlin code examples.
As part of writing and testing his Result monad, the author (Michael Bull) has
translated the F# example presented in Scott Wlaschin's
Railway Oriented Programming
blog post.
I recently finished reading Scott's book 'Domain Modeling Made Functional'
(F# code from the book is
here) and I
highly recommend it for any one with a Java background that is interested
in functional programming. The ideas are powerful
total functions,
writing code that will not represent an invalid state instead instead of writing
tests,
I/O sandwiches,
baking dependencies in with partial application,
type lifting,
and data
flow programming
and all can all be implemented in Kotlin (and by extension,
Java).