return types of std.functional functions

yawniek via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Oct 12 08:04:22 PDT 2014


i found two snippets from the functional docs that do not work 
(anymore?)
http://dlang.org/phobos/std_functional.html


assert(compose!(map!(to!(int)), split)("1 2 3") == [1, 2, 3]);
and
int[] a = pipe!(readText, split, map!(to!(int)))("file.txt");

throwing a std.array.array into the mix works fine.

did this use to work? is there any other way of doing it?


More information about the Digitalmars-d-learn mailing list