http://d.puremagic.com/issues/show_bug.cgi?id=5073



--- Comment #4 from Rob Jacques <sandf...@jhu.edu> 2011-05-19 17:22:16 PDT ---
Minor update to handle fixed sized arrays properly.

template map(fun...) {
    auto map(Range)(Range r) {
        static if (fun.length > 1) {
            return Map!(unaryFun!(adjoin!(staticMap!(unaryFun,fun))),Range)(r);
        } else {
            static if( is(typeof(fun[0]) == delegate) ) {
                return Map!(fun, Range)(fun[0],r);
            } static if( is(Range E:E[]) ) {
                return Map!(unaryFun!fun, E[])(r[]);
            } else {
                return Map!(unaryFun!fun, Range)(r);
            }
        }
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to