robfletcher
03/10/2016, 2:40 PMAny. For example to do a generative algorithm I wrote
inline fun <T> IntRange.generate(initial: T, operation: (T) -> T) =
fold(initial) { acc, ignored -> operation(acc) }
Is there a built in way to do this with function types?