Commit graph

95 commits

Author SHA1 Message Date
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Robert burner Schadek
32d6e23d4e std.variant housekeeping
some bugs where resolved, so some tests could be enabled
remove outcomment code last modifed 2009

another update
2015-08-12 14:15:01 +02:00
Rainer Schuetze
adab223837 remove trailing whitespace, detab, tolf 2015-05-31 11:24:01 +02:00
Walter Bright
d9a9826e55 Revert "Introducing std.meta package" 2015-05-06 14:36:45 -07:00
Dicebot
a76d90c927 Phobos should only mention tuple as std.typecons.Tuple 2015-05-05 22:22:11 +03:00
Dicebot
1c9ae027ef Rename old std.typetuple symbols inside Phobos
staticIndexOf -> indexOf
allSatisfy -> all
anySatisfy -> any
staticMap -> Map
2015-05-05 22:22:11 +03:00
Dicebot
82f54a38d3 TypeTuple -> MetaList inside Phobos 2015-05-05 22:22:11 +03:00
Dicebot
73f773838d import std.typetuple -> import std.meta 2015-05-05 22:22:10 +03:00
Ulrich Kuettler
6f6c6862d6 Add table headers in ddoc function tables 2015-02-21 19:10:51 +01:00
Ulrich Kuettler
d076b6e72b Add a simple table for functions to the functional module
Fine points

Sort table of functions
2015-02-19 23:30:16 +01:00
H. S. Teoh
a43e8d22cd Move 'forward' to std.functional. 2015-02-16 10:54:58 -08:00
k-hara
e7b3d834d7 detab and remove trailing whitespaces 2015-02-10 00:56:40 +09:00
Denis Shelomovskij
3a7044009e Fix property enforcements in std.functional._ctfe* functions. 2015-01-26 11:56:39 +03:00
Rainer Schuetze
e661e59194 do not assume memoize cache initialized before the arguments and the result are actually written 2015-01-24 10:08:47 +01:00
Ilya Yaroshenko
efb880f651 move format to std.format
The reason is to do not import `std.uni` tables, `std.string` and
probably `std.algorithm`. Note that format is used in CTFE code and
`Exception` handing.

 And it is more comfortable to import `format` from `std.format`.

std.format: clean imports (2)

remove import std.math : pow from std.uni

update scope imports in std.algorithm

update scope imports in std.exception

doFormat -> template

update scope imports in std.typecons

update scope imports in std.functional

update scope imports in std.range

update std.conv scope import

std.format: clean imports (2)

remove import std.math : pow from std.uni

update scope imports in std.algorithm

update scope imports in std.exception

doFormat -> template

update scope imports in std.typecons

update scope imports in std.functional

update scope imports in std.range

move sfromat

add public import of sformat

use std.uni
2014-11-18 22:14:28 +03:00
Ilya Yaroshenko
2788715bc5 fix binaryFun
1. Make binaryFun correct for integer comparison.
2. Remove import of half of phobos for 100% cases in phobos.

`sort`, `cmp`, `find`, `startsWith`,  `sum` and other algorithms would
be compiled faster.

fix safeOp

fix safeOPs

Fix new unittest

fix binaryReverseArgs

fix not

fix new code

fix spaces after if

optimization

1. CTFE
2. Runtime (without inlining)

change condition

fix new code

fix safeOp

optimize CTFE

CTFE optimization

immutable -> enum

remove aliases

remove macros

CTFE matching

add debug info && fix not

add spaces

minor fix

added debug example

add debug unittests & fix

fix also and add unittests

fix

typo

if (!__ctfe) assert(false); added

use 01
2014-11-15 19:10:20 +03:00
Martin Nowak
996d8bc5db fixup #2591 - missing attributes for GC.malloc call 2014-11-12 01:04:54 +01:00
Martin Nowak
c12e66a000 improve memoize with size limit
- previous implementation was dropping complete
  hash-table whenever max size was reached

- new implementation simply replaces old values
  in a fixed size hash-table when hashes collide

- use cuckoo hashing for better space usage and to
  reduce collisions of frequently used values
2014-11-05 00:15:10 +01:00
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