
17 Sep
2010
17 Sep
'10
11:01 a.m.
On 17 September 2010 09:48, Christian Maeder
I support this proposal, because it is be more efficient. However, the (unfortunately so common) use of the auxiliary function "go" does not look nice to me. It looks less abstract (or declarative) just for efficiency reasons.
Hi Christian go here, and the top-level intersperse are both in the so-called "declaration style". The algorithm has one case for the first element (no prepend - take one) then another case for the all the rest (prepend with sep - take one - recurse). So the implementation is a literal (and concise) implementation of the algorithm - is this not declarative? Best wishes Stephen