Skip to content

Commit

Permalink
Add std.algorithm.iteration.cumulativeFold
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarp committed Apr 27, 2016
1 parent 86d4576 commit 5a9cedf
Show file tree
Hide file tree
Showing 3 changed files with 401 additions and 0 deletions.
13 changes: 13 additions & 0 deletions changelog.dd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ $(COMMENT Pending changelog for 2.072. This will get copied to dlang.org and
$(BUGSTITLE Library Changes,
$(LI $(RELATIVE_LINK2 process, Process creation in `std.process` was sped up
on Posix.))
$(LI $(RELATIVE_LINK2 std-algorithm-iteration-cumulativeFold, $(XREF
algorithm.iterator, cumulativeFold) was added.))
$(LI $(RELATIVE_LINK2 padLeft-padRight, `std.range.padLeft` and
`std.range.padRight` were added.))
$(LI $(RELATIVE_LINK2 regex-multiple-patterns, `std.regex.regex` now
Expand Down Expand Up @@ -40,6 +42,17 @@ $(LI $(LNAME2 process, Process creation in `std.process` was sped up on Posix.)
)
)

$(LI $(LNAME2 std-algorithm-iteration-cumulativeFold, $(REF cumulativeFold,
std, algorithm, iteration) was added.)

$(P $(XREF algorithm.iterator, cumulativeFold) returns the successive
reduced values of an input range.)
------
assert([1, 2, 3, 4, 5].cumulativeFold!((a, b) => a + b).array == [1, 3, 6, 10, 15]);
assert([1, 2, 3].cumulativeFold!((a, b) => a + b)(100).array == [101, 103, 106]);
------
)

$(LI $(LNAME2 padLeft-padRight, `std.range.padLeft` and `std.range.padRight`
were added.)
$(P $(XREF range, padLeft) and $(XREF range, padRight) are functions for
Expand Down
Loading

0 comments on commit 5a9cedf

Please sign in to comment.