Last active
December 25, 2015 06:25
-
-
Save philipschwarz/e9b2401a84755de23b18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jooq.lambda.tuple.Tuple2; | |
| import static java.util.stream.Stream.iterate; | |
| import static org.jooq.lambda.tuple.Tuple.tuple; | |
| public class Main | |
| { | |
| public static void main(String[] args) | |
| { | |
| iterate( | |
| tuple(1,1), | |
| t -> tuple(t.v2, t.v1 + t.v2) | |
| ).mapToInt(Tuple2::v1) | |
| .limit(10).forEach(System.out::println); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment