Is &quot;speed x&quot; at least a somewhat universal term for the number of list elements that get operated on per iteration? It works really well.<br><br>I was also wondering about what you just pointed out: if there&#39;s a nice way to form (what I now know to call) speed &gt;1 functions. Your form looks a lot nicer than some of the stranger things I&#39;ve been coming up with.<br>
<br><div class="gmail_quote">On Thu, Jan 12, 2012 at 1:37 AM, Stephen Tetley <span dir="ltr">&lt;<a href="mailto:stephen.tetley@gmail.com">stephen.tetley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Direct recursion is almost always clearer if you are traversing the<br>
list at a &quot;different speed&quot;. The usual list functionals (map, filter,<br>
folds) are all speed 1 - traversing one element at a time. Here we<br>
want pairwise traversal:<br>
<br>
unscan :: (a -&gt; a -&gt; b) -&gt; [a] -&gt; [b]<br>
unscan f (a:b:bs) = f a b : unscan f b bs<br>
unscan _ _        = []<br></blockquote></div>