Ray Rahke
02/21/2024, 7:47 AMit implicit parameter keyword in lambdas. is using x -> an alternative?
like all { element -> fn(elemenet) } instead of all { fn(it) }
is this a respectable / idiomatic practice in kotlin?Goetz Markgraf
02/21/2024, 8:19 AMit the code becomes more readable and sounds more like an english sentence.
I would advice to use it in small lambdas, where it is clear, what it means. For longer or nested lambdas, you could and should use named parametersRay Rahke
02/21/2024, 9:38 AMKlitos Kyriacou
02/21/2024, 9:39 AMall(::fn)