Changeset 288

Show
Ignore:
Timestamp:
05/14/11 12:21:49 (1 year ago)
Author:
dsimcha
Message:

Minor updates for 2.053.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/base.d

    r276 r288  
    123123    static assert(isIterable!(Foo)); 
    124124    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))); 
    126128} 
    127129 
     
    149151    static assert(is(IterType!(Foo) == uint)); 
    150152    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)); 
    152156} 
    153157 
  • trunk/regress.d

    r286 r288  
    3333 */ 
    3434module dstats.regress; 
    35 version = penalized; 
    3635 
    3736import std.math, std.algorithm, std.traits, std.array, std.traits, std.exception, 
     
    4241 
    4342version(unittest) { 
    44     import std.stdio, dstats.random
     43    import std.stdio, dstats.random, std.functional
    4544    void main(){} 
    4645} 
     
    779778    } 
    780779 
    781     typeof(X) xSaved; 
    782780    static if(arrayX) { 
    783         xSaved = X.tempdup; 
     781        auto xSaved = X.tempdup; 
    784782        foreach(ref elem; xSaved) { 
    785783            elem = elem.save; 
    786784        } 
    787785    } else { 
     786        auto xSaved = X; 
    788787        foreach(ti, Type; X) { 
    789788            xSaved[ti] = X[ti].save; 
     
    17571756                take(cycle([1,1,1,1,0]), 500_000)); 
    17581757    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)); 
    17601759    auto x4_3 = take(cycle([1,2,3,4,5]), 1_000_000); 
    17611760    auto x4_4 = take(cycle([8,6,7,5,3,0,9]), 1_000_000);