Split Dodge.Base

This commit is contained in:
2022-06-19 11:34:59 +01:00
parent 6cc29813d8
commit df1f3ad6b0
15 changed files with 106 additions and 88 deletions
+9
View File
@@ -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