Java tutorial
//package com.java2s; public class Main { public static Runnable andThen(Runnable r1, Runnable r2) { return () -> { r1.run(); r2.run(); }; } }