Changeset 288
- Timestamp:
- 05/14/11 12:21:49 (1 year ago)
- Files:
-
- trunk/base.d (modified) (2 diffs)
- trunk/regress.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/base.d
r276 r288 123 123 static assert(isIterable!(Foo)); 124 124 static assert(isIterable!(uint[string])); 125 static assert(isIterable!(Chain!(uint[], uint[]))); 125 126 auto c = chain((uint[]).init, (uint[]).init); 127 static assert(isIterable!(typeof(c))); 126 128 } 127 129 … … 149 151 static assert(is(IterType!(Foo) == uint)); 150 152 static assert(is(IterType!(uint[string]) == uint)); 151 static assert(is(IterType!(Chain!(uint[], uint[])) == uint)); 153 154 auto c = chain((uint[]).init, (uint[]).init); 155 static assert(is(IterType!(typeof(c)) == uint)); 152 156 } 153 157 trunk/regress.d
r286 r288 33 33 */ 34 34 module dstats.regress; 35 version = penalized;36 35 37 36 import std.math, std.algorithm, std.traits, std.array, std.traits, std.exception, … … 42 41 43 42 version(unittest) { 44 import std.stdio, dstats.random ;43 import std.stdio, dstats.random, std.functional; 45 44 void main(){} 46 45 } … … 779 778 } 780 779 781 typeof(X) xSaved;782 780 static if(arrayX) { 783 xSaved = X.tempdup;781 auto xSaved = X.tempdup; 784 782 foreach(ref elem; xSaved) { 785 783 elem = elem.save; 786 784 } 787 785 } else { 786 auto xSaved = X; 788 787 foreach(ti, Type; X) { 789 788 xSaved[ti] = X[ti].save; … … 1757 1756 take(cycle([1,1,1,1,0]), 500_000)); 1758 1757 auto x4_1 = iota(0, 1_000_000); 1759 auto x4_2 = map!exp(map!"a / 1_000_000.0"(x4_1));1758 auto x4_2 = array(map!(compose!(exp, "a / 1_000_000.0"))(x4_1)); 1760 1759 auto x4_3 = take(cycle([1,2,3,4,5]), 1_000_000); 1761 1760 auto x4_4 = take(cycle([8,6,7,5,3,0,9]), 1_000_000);
