Ugh, PHP
Ce n’est pas functional programming:
array_walk($line, create_function('&$i', '$i = trim($i);'));
(Especially since syntax highlighting sees the ‘code’ as a string.)
Ce n’est pas functional programming:
array_walk($line, create_function('&$i', '$i = trim($i);'));
(Especially since syntax highlighting sees the ‘code’ as a string.)
| « The More Things Change… | There might be something to Behaviour-Driven-Development after all » |
|
|
You’re right – Ugh. :) Haven’t really ever used PHP, but I assume in Ruby this would be
line.map! { |i| trim i }
Ahh, much better.