Commit graph

526 commits

Author SHA1 Message Date
Jack Stouffer
3890f5d804 Fixed long lines in std/algorithm/iteration.d 2016-05-10 20:51:39 -04:00
Ryan Roden-Corrent
ed03b22bc0 Support multi-arg opApply/range for each.
std.algorithm.iteration.each can now be called with a lambda taking >2
args. This should work for any input range that returns a tuple and any
type with a non-templated opApply that takes a multi-arg delegate.

Determining the arity of a templated opApply still poses a problem, so
that case is not supported.

This also adds support for `each` with two ref args.

When given a binary function that takes two args by ref,
std.algorithm.iteration.each should use both args by ref.

It was previously discarding ref on the first arg, assuming it was for
an index.

Resolves #15358.
2016-05-08 07:22:48 -04:00
Martin Nowak
72fdea91e0 Merge pull request #4235 from wilzbach/multisort_with_pred
Fix issue 10777 - multiSort should return a SortedRange
2016-05-06 00:43:56 +02:00
anonymous
4a28601977 rewrap 2016-04-30 20:30:16 +02:00
anonymous
f46e52b4f2 documentation: fix requirements of remove
All overloads require a bidirectional range with lvalue elements.
2016-04-30 20:26:34 +02:00
Sebastian Wilzbach
6b165d4deb Fix issue 10777 - multiSort should return a SortedRange 2016-04-30 12:38:27 +03:00
Dmitry Olshansky
85f9e816da Merge pull request #3972 from dcarp/std_algorithm_iteration_scan
Add std.algorithm.iteration.cumulativeFold
2016-04-29 16:18:55 +04:00
Sebastian Wilzbach
cc5e36d1b4 std.algorithm.searching - fix weird bug in Travis 2016-04-28 17:30:05 +03:00
Dmitry Olshansky
18dfffa07d Merge pull request #4221 from wilzbach/min_max_element
std.algorithm: {min,max}Element for a single range
2016-04-28 17:13:24 +04:00
Dragos Carp
984fbb487d Address review comments 2016-04-27 22:12:33 +02:00
Dragos Carp
5a9cedf1bd Add std.algorithm.iteration.cumulativeFold 2016-04-27 22:12:32 +02:00
Dmitry Olshansky
c1027f1970 Merge pull request #4246 from wilzbach/sed_spaces_part_2
style fix: add space after 'for' operator
2016-04-27 16:17:18 +04:00
Sebastian Wilzbach
e3d0aa9724 std.algorithm: {min,max}Element for a single range 2016-04-27 04:40:11 +03:00
Brian Schott
6a349b32ca Merge pull request #4238 from 9il/swap
Trivial. clean imports in sorting
2016-04-26 17:11:52 -07:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Ilya Yaroshenko
f5f0fa5cd6 clean imports in sorting 2016-04-26 17:07:30 +02:00
Brian Schott
edbb7a1537 Merge pull request #4030 from dcarp/issue15735
Fix issue 15735
2016-04-25 18:21:16 -07:00
Dmitry Olshansky
4b44f19180 Merge pull request #4214 from wilzbach/sort_use_release
std.algorithm.sort docu: use release to get the source back
2016-04-22 18:40:52 +04:00
Sebastian Wilzbach
95cb575338 add isStrictlyMonotonic for ranges 2016-04-20 22:57:44 +03:00
Sebastian Wilzbach
120b7a4a56 std.algorithm.sort docu: use release to get the source back 2016-04-20 17:44:18 +03:00
Dmitry Olshansky
1d2e88c266 Merge pull request #4069 from John-Colvin/patch-16
faster pairwise summation
2016-04-12 13:17:18 +04:00
Jack Stouffer
12c17d4fd0 Cleaned up std.algorithm.joiner's docs 2016-04-11 22:38:35 -04:00
Dragos Carp
b438bf5a06 Fix issue 15735 2016-04-11 20:58:23 +02:00
Dmitry Olshansky
401158d54a Merge pull request #4167 from 9il/api
clean API for moveAt, fix indexes/lengths to be type of size_t, fix length declarations
2016-04-10 17:07:51 +04:00
Ilya Yaroshenko
d4fa64bb42 fix index types to size_t 2016-04-10 12:46:51 +02:00
Ilya Yaroshenko
ddf8268d42 UFCS for moveAt, moveFront, moveBack 2016-04-09 09:28:14 +02:00
Sebastian Wilzbach
b05f4afe1c change usage of swapAt to UFCS 2016-04-08 01:18:45 +03:00
Sebastian Wilzbach
c373792434 document std.algorithm.mutation: swapAt 2016-04-08 01:18:36 +03:00
Ilya Yaroshenko
95ea08d50b fix imports 2 2016-04-07 15:54:04 +02:00
H. S. Teoh
7c752bf5f0 Merge pull request #4084 from ntrel/move-docs
Improve docs for std.algorithm.mutation.move & related functions
2016-03-31 18:54:31 -07:00
Brian Schott
9e2c241f51 Merge pull request #4131 from greenify/ordered_to_package_booktable
add std.algorithm.sorting {ordered,strictlyOrdered} to std.algorithm booktable
2016-03-29 16:43:53 -07:00
Sebastian Wilzbach
3f0db27026 add std.algorithm.sorting {ordered,strictlyOrdered} to std.algorithm booktable 2016-03-29 21:30:25 +03:00
Sebastian Wilzbach
1acba2b257 Suggest bracket-free template syntax in the doc of std.algorithm 2016-03-29 19:32:11 +03:00
Nick Treleaven
00032f65ad Improve docs for std.algorithm.mutation.move & related functions
Clarify that `move` doesn't always do a destructive copy.
Improve std.algorithm.mutation.move, moveEmplace examples.
Make moveAll, moveSome description easier to read.
Fix parameter name typos source -> src, tgt.
2016-03-29 12:35:04 +01:00
John Colvin
678a511ff2 faster pairwise summation 2016-03-24 13:14:42 +00:00
Sebastian Wilzbach
540ff4576f std.algorithm.sorting: fix - save reference in isSorted 2016-03-23 16:01:51 +02:00
Dmitry Olshansky
1b4100d63f Revert "Merge pull request #4025 from greenify/is_strictly_sorted"
This reverts commit 1f00853513, reversing
changes made to 580d72f3b3.
2016-03-21 21:10:38 +03:00
Dmitry Olshansky
1f00853513 Merge pull request #4025 from greenify/is_strictly_sorted
add isStrictlySorted for ranges
2016-03-21 15:24:30 +03:00
Brian Schott
f63523b1a8 Merge pull request #4065 from tsbockman/pr3969_fixup
Fixup for PR#3969
2016-03-18 16:58:13 -07:00
Sebastian Wilzbach
3209fe0bfb add isStrictlySorted for ranges 2016-03-14 20:34:33 +02:00
H. S. Teoh
5dc9102d67 Merge pull request #3913 from JakobOvrum/std_algorithm_table_either
Tweak std.algorithm.comparison.either docs and add to package doc table
2016-03-09 13:40:34 -08:00
H. S. Teoh
afc40287e0 Merge pull request #4066 from greenify/examples_to_unittest_setops
convert docstring examples to unittests [setops]
2016-03-09 12:17:37 -08:00
Sebastian Wilzbach
ce79561214 convert docstring examples to unittests 2016-03-08 14:54:55 +02:00
tsbockman
6c8333627c Fix map() to work with multi-module overload sets.
Verify return values for multiple lambda unittest.
2016-03-07 12:48:06 -08:00
Jakob Øvrum
22a90f904e Tweak std.algorithm.comparison.either docs and add to package doc table 2016-03-06 22:45:06 +09:00
Atila Neves
9cc2a5ae59 Replace 'reduce' with 'fold' in the documentation 2016-03-05 18:50:11 +01:00
Atila Neves
5d0ff1e1e5 Introduce "fold" as an alternative to "reduce" 2016-02-26 18:36:34 +01:00
Robert Schadek
5e5a8010ef Merge pull request #4004 from quickfur/cache-ddoc
[doc only] Improve ddoc for std.algorithm.iteration.cache
2016-02-25 12:46:09 +01:00
Per Nordlöw
74deecc374 Update searching.d
Tag code with D ddoc tag.
2016-02-24 16:23:01 +01:00