This file contains 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
Remove-Item -Recurse -Force |
This file contains 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
package fizzbuzz; | |
import java.util.stream.Stream; | |
public class FizzBuzzWriter { | |
public static void main(String[] args) { | |
// FizzBuzzの無限リスト | |
Stream<FizzBuzz> fizzbuzz = Stream.iterate(new FizzBuzz(0), fb -> { | |
fb.setIndex(fb.getIndex() + 1); | |
return fb; |
This file contains 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
package fizzbuzz; | |
import java.util.stream.Stream; | |
public class FizzBuzzWriter { | |
public static void main(String[] args) { | |
// FizzBuzzの無限リスト | |
Stream<String> fizzbuzz = Stream.iterate(0, i -> ++i).map(i -> | |
(i % 15 == 0) ? "Fizbuzz" : | |
(i % 3 == 0) ? "Fizz" : |
This file contains 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
// Integer.MAX_VALUEを含まない | |
IntStream.range(1, Integer.MAX_VALUE); | |
// Integer.MAX_VALUEを含む | |
IntStream.rangeClosed(1, Integer.MAX_VALUE); |
NewerOlder