|
@@ -94,6 +94,11 @@ updateGrid g m =
|
|
|
let Grid cm = g in
|
|
|
Grid (zipWith (zipWith updateCell) cm m)
|
|
|
|
|
|
+applyi::(a -> a) -> Int -> [a] -> [a]
|
|
|
+applyi f i xs =
|
|
|
+ let (xs1, xs2) = splitAt i xs in
|
|
|
+ concat [xs1, ( (f (head xs2)) : tail xs2 )]
|
|
|
+
|
|
|
|
|
|
-- Testing data
|
|
|
|