Opened 9 years ago

Closed 9 years ago

#23 closed enhancement (fixed)

Add array update operator (//)

Reported by: benl Owned by:
Priority: normal Milestone:
Component: library Version:
Keywords: Cc:


From SO:

(//) :: Shape sh => Array sh a -> [(sh,a)] -> Array sh a
(//) arr us = fromFunction (extent arr) (\sh -> case lookup sh us of
                                                 Just a  -> a
                                                 Nothing -> index arr sh)

Change History (1)

comment:1 Changed 9 years ago by benl

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.