Kotlin doesn't have structural typing but you can ...
# stdlib
k
Kotlin doesn't have structural typing but you can get very decent results using the functional approach @cedric describes. an example is the function I posted above.