streams: Java Stream API + Collectors cookbook module (creation, laziness and short-circuiting, intermediate/terminal ops, Collectors recipes and toMap traps, primitive stream overflow, parallel traps, Gatherers on JDK 25, loop-to-stream conversion), 12 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b49nGy7tcEjVUa3WAA
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
windowFixed(3) : [[1, 2, 3], [4, 5, 6], [7]]
|
||||
windowSliding(3) : [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7]]
|
||||
scan (running sum) : [1, 3, 6, 10, 15, 21, 28]
|
||||
fold (one result) : [28]
|
||||
mapConcurrent(2) : [10, 20, 30, 40, 50, 60, 70]
|
||||
3-point moving avg : [2.0, 3.0, 4.0, 5.0, 6.0]
|
||||
dedupeAdjacent : [1, 2, 1, 3] <- distinct() would give [1, 2, 3]
|
||||
Reference in New Issue
Block a user