Opened 14 years ago

Closed 13 years ago

#23 closed enhancement (fixed)

Add array update operator (//)

Reported by: Ben Lippmeier Owned by:
Priority: normal Milestone:
Component: library Version: 2.0.0.3
Keywords: Cc:

Description

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 13 years ago by Ben Lippmeier

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.