Hi
The way to know which is faster is to Benchmark
The map versions are all identical :) from a "style" point of view
The way to decide between SPLIT_IF_FOO and SPLIT_FOO is not based on chracter count in a map, but which is more useful/generic, which verbs/actions the problem ...
map/splice/foreach, they're all idiotmatic
The only problem with your c-style for loop is modifying $i in two different places
If the only goal of this code is to expand_foo $items, there should be no maps or splices anywhere, just simple recursion with a foreach
* no not even map in void context thats poor style
In reply to Re: To splice or not to splice? What implementation is more readable, efficient, etc.?
by Anonymous Monk
in thread To splice or not to splice? What implementation is more readable, efficient, etc.?
by vr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |