https://kotlinlang.org logo
#announcements
Title
# announcements
p

pniederw

03/05/2017, 4:13 AM
@pardom the closest I’m aware of (both in java and kotlin) is:
Copy code
private val id = { x: Any -> x }
  @Suppress("UNCHECKED_CAST")
  fun <A: Any> identity(): (A) -> A = id as ((A) -> A)