13
votes
1answer
268 views

Shorter syntax for Fold and FoldList?

I find it tedious to write out the following: a = {1, 2, 3, 4}; Fold[f, First @ a, Rest @ a] f[f[f[1, 2], 3], 4] It ...
5
votes
2answers
224 views

Overlapping pure functions

Let say I need and option for Plot: RegionFunction -> (-6 < #2 < 6 &) But I also want those ...
6
votes
2answers
274 views

Why are we so sure about Map results?

I do abuse it often but when I have faced this feature first time I was really suprised: i = 0; (i++; # - i) & /@ Range[5] {0, 0, 0, 0, 0} What am I ...