Monday, December 28th, 2009
My new favorite function: map
Map, that’s my new favorite pure function. It’s very simple in use and has tons of uses! Ever been fidgeting with numbers trying to get the right output? Save your time the next time and use Map!
1234function map($v, $a, $b, $x = 0, $y = 1)
{
return ($v == $a) ? $x : ($v – [...]
