Split Dodge.Base
This commit is contained in:
@@ -29,3 +29,12 @@ plNew :: ALens' b (IM.IntMap a)
|
||||
-> b
|
||||
-> b
|
||||
plNew l li x = snd . plNewUpID l li x
|
||||
|
||||
-- | place an new object into an intmap using the new id
|
||||
plNewUsing :: ALens' b (IM.IntMap a)
|
||||
-> (Int -> a)
|
||||
-> b
|
||||
-> b
|
||||
plNewUsing l f x = x & l #%~ IM.insert i (f i)
|
||||
where
|
||||
i = IM.newKey $ x ^# l
|
||||
|
||||
Reference in New Issue
Block a user