Logo

Programming-Idioms

History of Idiom 172 > diff from v18 to v19

Edit summary for version 19 by senfoel:
[Haskell] typo

Version 18

2020-01-06, 12:05:18

Version 19

2020-01-06, 12:06:11

Idiom #172 Insert entry in map

Insert value v for key k in map m.

Idiom #172 Insert entry in map

Insert value v for key k in map m.

Extra Keywords
associative
Extra Keywords
associative
Imports
import qualified Data.Map as Map
Imports
import qualified Data.Map as Map
Code
newM = Map.insert v k m
Code
newM = Map.insert k v m
Comments bubble
This creates a new Map
Comments bubble
This creates a new Map