Commit graph

657 commits

Author SHA1 Message Date
Brad Roberts
40096b78a6 forward should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
0731be725d swap should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
012dde3e3d filter should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
5ffe91fac1 fill should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
61712f506f cache and reduce should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
73272aa277 topN should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
140f312e85 partition should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
d7bd499e0c remove should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
2eda1f1d07 bringToFront should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
ad6bd732b3 swapRanges and reverse should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
426bc40535 copy should be @safe 2014-10-13 00:09:18 -07:00
Brad Roberts
e3a6792077 livenshteinDistance should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
c7f75bacb0 mismatch should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
38c74788e3 minPos should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
a2b1174f58 cmp should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
ee08f39af5 equal should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
aeaf63ede7 map should be @safe 2014-10-13 00:09:17 -07:00
Brad Roberts
f70e1e41e4 Fix unpredictableSeed so that rndstuff can be used in @safe code
Allows:
1) canFind's tests to be @safe
2) allows the remainder of find's tests to be @safe
2014-10-13 00:04:37 -07:00
Brad Roberts
3200b08644 Improve find's @safety 2014-10-13 00:01:14 -07:00
H. S. Teoh
95f143f279 Refactor to eliminate redundant call to r.empty.
.savePrev and .prev should be private.
2014-10-05 19:31:09 -07:00
H. S. Teoh
70bec52d34 Move std.range.chunkBy to std.algorithm.groupBy. 2014-10-05 19:31:09 -07:00
H. S. Teoh
95222b884d Merge pull request #2582 from monarchdodra/cacheBug
Tweak cache constructor
2014-10-03 07:54:48 -07:00
monarchdodra
282fc0189e Tweak cache constructor 2014-10-03 16:08:46 +02:00
Vladimir Panteleev
c8242fe580 std.algorithm: Add cache and cacheBidirectional to the cheat sheet 2014-10-02 14:28:35 +00:00
Dmitry Olshansky
83e90a86c4 Merge pull request #1364 from monarchdodra/cache
Range adaptor: cache
2014-09-25 14:36:46 +04:00
Jakob Ovrum
8169a4aa59 Tweak #2532 2014-09-21 02:19:33 +09:00
Daniel Murphy
2bd311c0ed Merge pull request #2534 from quickfur/issue13091
Use new cartesianProduct implementation for 2-argument case as well.
2014-09-19 18:40:48 +10:00
H. S. Teoh
a432798f15 Bug number shouldn't appear in ddocs! 2014-09-18 17:55:44 -07:00
H. S. Teoh
556ef61ef8 Use new cartesianProduct implementation for 2-argument case as well.
The original implementation will now only be used when one or both the
ranges is either non-forward or infinite. The new implementation is also
more attribute-friendly (works with pure, nothrow, @nogc, @safe), so
this also fixes issue 13091.
2014-09-18 17:43:09 -07:00
H. S. Teoh
0b6bfd5aa7 Cross-reference among from canFind.
For newbies' ease of discovering the right function to use (issue 13467).
2014-09-18 13:02:43 -07:00
monarch dodra
ebcc18e387 Range adaptor: cache
As discussed in this thread:
http://forum.dlang.org/thread/ovbjcmogezbvsxrwfcol@forum.dlang.org

This provides a range adaptor that cache the result of another range.

Meant as a lazy alternative to array. Not much else to say...?

Documentation might suck.
2014-09-16 21:43:26 +02:00
H. S. Teoh
575b4aec7f Merge pull request #1266 from idanarye/add-functional-pattern-matching-for-object-references
fix issue 9959 - Add functional pattern matching for object references
2014-09-16 07:15:10 -07:00
Vladimir Panteleev
c506b03ec4 fix Issue 13441 - joiner asserts with only(x) separator 2014-09-09 11:35:20 +00:00
Per Nordlöw
7f3611a5ed Add empty check for haystack range r in skipOver()
Remove space
2014-09-02 14:28:35 +02:00
H. S. Teoh
6c53bfc58f Use auto instead of explicit array type. 2014-08-30 07:09:57 -07:00
H. S. Teoh
76db0de19c Eliminate C-style array declarations. 2014-08-30 06:51:27 -07:00
monarch dodra
dd4b204d5b Merge pull request #2473 from quickfur/issue13393
Fix regression 13393: cartesianProduct + joiner = runtime assertion failure
2014-08-30 00:10:29 +02:00
H. S. Teoh
6e31087817 Simplify unittest. 2014-08-28 17:03:07 -07:00
H. S. Teoh
ca96460a1e Fix regression 13393.
Caused by .save failing to save entire state, causing inconsistency in
.save'd objects.
2014-08-28 16:49:24 -07:00
Peter Alexander
5e0532b9e7 Fix Issue 10460 - auto ref for Union, SetDifference, SetSymmetricDifference
https://issues.dlang.org/show_bug.cgi?id=10460

The rearrangement of SetSymmetricDifference.front was needed since auto ref doesn't deduce correctly when there are multiple return statements (by design), so a single return statement with the ternary operator was used.
2014-08-25 13:32:34 +01:00
Михаил Страшун
bfebba8683 Merge pull request #2431 from monarchdodra/13304
Fix reduce regression 13304.
2014-08-21 22:30:51 +02:00
monarchdodra
76f994abf9 Fix reduce regression 13304.
Also cover test case 10709.
2014-08-21 20:17:22 +02:00
Михаил Страшун
676290c36d Merge pull request #2415 from quickfur/issue13257
Workaround deprecation of splitter.{back,popBack} in std.algorithm.map.
2014-08-18 22:07:03 +02:00
IdanArye
cf1aa96bc4 fix issue 9959 - Add functional pattern matching for object references
Add the function std.algorithm.castSwitch, which chooses a delegate
based on the class of an object and run that delegate with that object.
2014-08-18 22:15:00 +03:00
H. S. Teoh
3c6efdf4e3 Reenable ancient failing unittest.
Fix unittest to not require unreasonable amounts of stack space.
2014-08-13 11:32:20 -07:00
H. S. Teoh
b97b396864 Workaround deprecation of splitter.{back,popBack} in std.algorithm.map. 2014-08-10 15:47:13 -07:00
IdanArye
0318f0ffba fix issue 9942 - Add a functional switch function
std.algorithm.predSwitch is the functional version of the `switch`
statement(without a lookup table).
2014-08-09 17:13:15 +03:00
Dmitry Olshansky
53de1da98b Merge pull request #2060 from monarchdodra/reduceReimpl
Re-implement reduce
2014-07-28 03:59:46 +04:00
monarchdodra
096ae6ab87 Use assertThrown in reduce unittest 2014-07-27 22:59:07 +02:00
monarchdodra
2572cef9d4 Reduce unittest for 10709, 12569, and...
...an unfiled issue from the forums
2014-07-27 22:59:07 +02:00