Opened 6 years ago

Closed 6 years ago

#23 closed enhancement (fixed)

Add array update operator (//)

Reported by: benl 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 6 years ago by benl

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