// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.List;

public class ItFun {
    public static void main(String[] args) {
        List<Integer> lst = List.of(1, 2, 3, 4, 5);
        lst.stream().forEach(v -> System.out.println(v));
        lst.stream().sequential().forEach(v -> System.out.println(v));
        lst.stream().parallel().forEach(v -> System.out.println(v)); // not correct code - System.out.println is not thread safe
    }
}
