Fast Sequences

Jim Apple jbapple+haskell-lib at gmail.com
Sun Mar 26 22:54:59 EST 2006


On 3/26/06, Ross Paterson <ross at soi.city.ac.uk> wrote:
> > So, head . reverse is . . . O(1)?
>
> Certainly.  The middle subtree, containing all but 2 to 8 of the elements,
> is unused.

Ah, of course. Let me try to ask a better question:
How about

(flip index i) . reverse

Is that O(i)?

Jim


More information about the Libraries mailing list