in reply to Re^2: (almost) foldl
in thread (almost) foldl

my @list = ( -4 .. 6 ); print map((1)x$_,@list) - map((1)x-$_,@list);

- tye        

Replies are listed 'Best First'.
Re^4: (almost) foldl (-map)
by Grimy (Pilgrim) on Jun 08, 2011 at 20:48 UTC
    Wow. That's a exactly (and I mean, exactly) the first idea I had to solve the negative numbers problem. I didn't post it, though, because it doesn't handle decimal numbers.