> Edison uses
>   update :: Seq s => Int -> a -> s a -> s a
>   adjust :: Seq s => (a -> a) -> Int -> s a -> s a
> for what my guidelines could give
>   setElem    :: Seq s => s a -> Int -> a -> s a
>   updateElem :: Seq s => s a -> Int -> (a -> a) -> s a
> 
> Not that I don't like partial application, but Edison's order is
> usually not used elsewhere, e.g. in PosixTTY (using "with" prefix
> instead of my "set"), Bits (using separate setBit and clearBit instead
> of setBit with Bool parameter, and complementBit instead of updateBit -
> but the latter is OK), FiniteMap.
> 
> Maybe we should promote Edison's order, which is consistent with
> module List, but what about above libraries?

Simon PJ sold me on this order, which supports multiple updates like

  update 1 'a' $ update 2 'b' $ update 3 'c' s

instead of

  update (update (update 3 'c' s) 2 'b) 1 'a'

Chris


Reply via email to