Commit graph

177 commits

Author SHA1 Message Date
monarchdodra
3d0c4ea166 not with multiple arguments 2014-10-10 13:21:50 +02:00
H. S. Teoh
6ab2d64018 Fix broken case of function object with non-static opCall. 2014-10-03 13:11:57 -07:00
H. S. Teoh
3e200db2af Revert AA/array extension to unaryFun.
Per PR discussion.
2014-09-29 20:22:50 -07:00
H. S. Teoh
c8da8e3b4a Update ddocs. 2014-09-29 20:21:17 -07:00
H. S. Teoh
07b580b6ef Fix 9906: unaryFun and binaryFun should recognize static opCall
Structs or classes with static `opCall` should be recognized as valid
function objects.
2014-09-29 20:21:17 -07:00
Nick Treleaven
60ba69f314 Partially evaluates -> Partially applies 2014-08-26 12:16:54 +01:00
Lionello Lunesu
2815d548d3 Added std.algorithm.safeLess for safe signed/unsigned comparison; rewrote min/max 2014-07-13 13:09:45 +08:00
jlquinn
5a4a902290 Better clarity in describing parameters.
Incorporated latest comment.
2014-06-23 13:20:14 -04:00
jlquinn
566c5b5764 Fix typo.
Fixing a silly typo.
2014-06-14 02:40:33 -04:00
jlquinn
24a4d52009 Document template args
Add documentation for remaining template arguments in unaryFun and binaryFun.
2014-06-12 11:17:46 -04:00
monarchdodra
d609bd332f Sed "@safe pure nothrow" 2014-05-06 08:21:13 +02:00
Tim Holzschuh
9722dfdfaa Trivial error-msg-fix in std.functional 2014-04-27 13:28:08 +02:00
Monarch Dodra
70dff45550 Fix Issue 12568 - std.functional.memoize does not work with constant
arrays.
2014-04-23 22:22:08 +02:00
Simen Kjærås
e35c5058c3 Generalized binaryReverseArgs for more args 2014-03-30 21:54:34 +00:00
monarchdodra
f92dcf564d Improve return value construction in adjoin 2014-03-16 17:06:58 +01:00
monarchdodra
a965d76d77 Split adjoin in two templates 2014-03-15 20:04:19 +01:00
monarch dodra
13eec8dec7 Redocument and tweak adjoin 2014-03-13 11:45:37 +01:00
monarch dodra
b4b1cc9131 Make adjoin take by auto-ref 2014-03-11 17:49:05 +01:00
monarch dodra
8eb6dcec30 Make adjoin's example a DDoc'ed unittest 2014-03-11 17:49:05 +01:00
Andrei Alexandrescu
35c743967b Merge pull request #1979 from msoucy/issue4391a
Renamed curry->partial to better match semantics
2014-03-09 22:32:10 -07:00
Phillip Larkson
1dfab3d93b Change documentation to mention aliasing self away in unaryFun/binaryFun 2014-03-09 14:59:57 +11:00
Matt Soucy
8f34ac0a6f Added deprecation message 2014-03-03 17:30:40 -05:00
Matt Soucy
dae6f92771 Renamed curry->partial to better match semantics
Documentation was updated to match, and a deprecated alias was inserted
for compatibility.
2014-03-03 15:41:15 -05:00
monarchdodra
b1f798f844 more std.functional import scoping 2014-02-22 11:19:12 +01:00
monarchdodra
3b1c2263d4 Make imports scoped in functional 2014-02-22 11:04:51 +01:00
Ivan Kazmenko
e58a84aed9 typo in memoize example 2014-02-16 18:04:50 +04:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
monarchdodra
6ceda934a2 Tweak n-ary mixin impelmentations 2014-01-11 15:59:59 +01:00
monarch dodra
31acdb075b make *naryFun take by auto ref 2014-01-11 15:59:58 +01:00
jmdavis
2735d30f4e Remove all uses of std.metastrings.Format. 2013-02-24 18:42:46 -08:00
k-hara
2897ca8807 fix Issue 9062 - AddrExp should distinguish the existence of property resolution 2012-11-23 14:25:24 +09:00
k-hara
3ae3fe6d38 fix Issue 5358 - std.functional.binaryReverseArgs missing from documentation 2012-04-21 15:49:48 +09:00
k-hara
e2c892fdbf fix Issue 7878 - A problem with purity and general templated algorithms 2012-04-21 15:48:30 +09:00
k-hara
b7e47383db More use of eponymous template trick 2012-01-29 20:39:55 +09:00
k-hara
af9ea3465c Move implementation templates into template local scope 2012-01-29 20:37:48 +09:00
shoo
46ea5d6b36 Allow convert @safe function into delegate by toDelegate 2012-01-24 22:33:28 +09:00
k-hara
78a2d8abdc Reduce module dependencies. 2011-09-29 07:09:16 +09:00
dawg
2415243b0c ctfe doesn't seem to have function pointers yet
- added reference to another dmd bug
2011-09-04 00:18:15 +02:00
dawg
10df09a290 allow to curry nary functions
- previously one could only curry binary functions
 - especially allow to bind unary function parameters
2011-09-04 00:10:08 +02:00
dawg
93a07bb067 the template constraint can't access the calling frame
- thus the alias arg can't be used
 - moved the check into curry and provided
   an error message if it fails
 - fixes most of the failing template curry tests
2011-09-04 00:10:08 +02:00
dawg
fce7b7602b add more unittests for std.functional.curry
- deactivated failing specs for now
2011-09-04 00:10:08 +02:00
jmdavis
25b755a843 Reverted isAsciiWhite to isWhite. 2011-06-22 19:20:15 -07:00
jmdavis
2d310e5e20 Changed the names of some of the std.ascii functions.
isWhite, isLower, isUpper, toLower, and toUpper now have Ascii in their
name, which matches what std.unit does with its versions of those
functions. Hopefully, it should also reduce bugs due to using the wrong
function between the ASCII and unicode versions by making the difference
more obvious.
2011-06-19 18:41:00 -07:00
jmdavis
76e1cfd2e9 Replaced calls to std.ctype.isspace with std.ctype.isWhite.
In a few places, I replaced it with std.uni.isUniWhite, but for the most
part, I replaced it with std.ctype.isWhite.
2011-06-12 16:59:50 -07:00
dsimcha
1578be026e Bug 5474: unaryFun byRef is borked for custom parameter name 2011-04-12 20:26:55 -04:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Andrei Alexandrescu
cf8815f542 Fix for issue 4994 2011-01-22 22:20:54 +00:00
Andrei Alexandrescu
272ceaa9a6 Improvements to replicate(); documented splitter() for strings; renamed replace() in place to replaceInPlace(); removed replace() that takes void* in the last position; moved replace() from string to array and generalized it; attached constraint to functional.not; more cleanup of std.string; improved std.algorithm.util and count to accept ranges; improved constraint in std.algorithm.remove 2011-01-21 08:39:39 +00:00
Andrei Alexandrescu
dcb32224bd unittest for http://d.puremagic.com/issues/show_bug.cgi?id=3531 2011-01-09 07:29:31 +00:00