Cleanup: broken pathfinding

This commit is contained in:
2021-11-16 18:05:47 +00:00
parent cb8cbe03a4
commit ebe9ad6b90
42 changed files with 491 additions and 301 deletions
+4
View File
@@ -7,6 +7,7 @@ module Padding
, rotU
, rotD
, rotListAt
, insertAt
)
where
leftPad :: Int -> a -> [a] -> [a]
@@ -46,3 +47,6 @@ rotListAt x' xs = f x' xs []
| y == x = y:ys ++ zs
| otherwise = f x ys (y:zs)
f _ [] zs = zs
insertAt :: Int -> a -> [a] -> [a]
insertAt i x xs = let (ys,zs) = splitAt i xs in ys ++ [x] ++ zs