[vector] #65: Provide a invidual-item update action in mutable vector API

vector vector at projects.haskell.org
Thu Oct 27 15:56:15 BST 2011


#65: Provide a invidual-item update action in mutable vector API
------------------------+---------------------------------------------------
Reporter:  hvr          |       Owner:     
    Type:  enhancement  |      Status:  new
Priority:  minor        |   Milestone:     
 Version:               |    Keywords:     
------------------------+---------------------------------------------------
 One of the operations I've caught myself defining is an `update` action
 for modifying an invididual item in a vector, i.e.:
 {{{
 #!hs
 import qualified Data.Vector.Unboxed.Mutable as VUM

 update vec idx op = VUM.write vec idx . op =<< VUM.read vec idx
 }}}

 Could such a convenience operation (unless it's already there) be added to
 the mutable vector APIs?

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/65>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list