Narrow down problem, probably with bullets hitting creature
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ import qualified Data.Set as S
|
|||||||
-- }}}
|
-- }}}
|
||||||
--
|
--
|
||||||
leftPad :: Int -> a -> [a] -> [a]
|
leftPad :: Int -> a -> [a] -> [a]
|
||||||
leftPad i x xs = reverse $ take i $ reverse xs ++ repeat x
|
leftPad i x xs = reverse $ take i $ reverse (take i xs) ++ repeat x
|
||||||
|
|
||||||
rightPad :: Int -> a -> [a] -> [a]
|
rightPad :: Int -> a -> [a] -> [a]
|
||||||
rightPad i x xs = take i $ xs ++ repeat x
|
rightPad i x xs = take i $ xs ++ repeat x
|
||||||
|
|||||||
Reference in New Issue
Block a user