Given discussions about "hyper" operators in the past, I found this rather interesting in the release notes.

http://pike.idonex.com/download/notes/7.4.10.xml

Automap
To perform per-element operations on arrays, there is now a convenience syntax for map(), that can make code more readable in some situations. Summing up two arrays element by element using automap looks like this:

a[*] + b[*]; // the result has as many elements as the shortest array.
Multiplying all elements in a by a constant:

a[*] * 4711;
Make an array of what sprintf("%O", a[n]) returns for all elements in a:

sprintf("%O", a[*]);

Reply via email to