标签:out print class 元组 stream str limit map 使用
使用Stream流输出斐波那契数列:
Stream.iterate(new int[]{0, 1},
t -> new int[]{t[1],t[0] + t[1]})
.limit(10)
.map(t -> t[0])
.forEach(System.out::println);
标签:out print class 元组 stream str limit map 使用
原文地址:https://www.cnblogs.com/sueyyyy/p/12228960.html