Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun startHere() {
- doAnything {
- System.out.println("Do something before 2nd thing")
- }
- }
- fun doAnything(block: () -> Unit) {
- System.out.println("Do 1st thing")
- block()
- System.out.println("Do 2nd thing")
- }
Add Comment
Please, Sign In to add comment