println( fix(1).take(10).toList ) println( up(1).take(10).toList ) println( up(10).take(20).filter(_%2==0).toList ) println( up(10).filter(_%2==0).take(20).toList ) } }
Standard input is empty
List(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) List(10, 12, 14, 16, 18, 20, 22, 24, 26, 28) List(10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48)