Start creating explicit tutorial map
This commit is contained in:
@@ -4,10 +4,7 @@ import LensHelp
|
||||
|
||||
-- | generalised way of putting a new item into a lensed intmap, returning the
|
||||
-- new index as well
|
||||
plNewID :: ALens' b (IM.IntMap a)
|
||||
-> a
|
||||
-> b
|
||||
-> (Int,b)
|
||||
plNewID :: ALens' b (IM.IntMap a) -> a -> b -> (Int,b)
|
||||
plNewID l x w = (i,w & l #%~ IM.insert i x)
|
||||
where
|
||||
i = IM.newKey $ w ^# l
|
||||
|
||||
Reference in New Issue
Block a user