ahdezma
04/20/2017, 7:05 AMclass Customer(var name: String = “Default”) {
fun doSomething(fn: (Customer) -> Unit) {
}
}
//JAVA
Customer myCustomer = new Customer();
myCustomer.doSomething(customer -> {
customer.setName("John");
return Unit.INSTANCE;
});