Continue to refactor item datatypes, add a shape to rockets
This commit is contained in:
@@ -30,6 +30,9 @@ takeUntil :: Foldable t => (a -> Bool) -> t a -> [a]
|
||||
takeUntil p = foldr (\x xs -> x : if p x then [] else xs) []
|
||||
|
||||
|
||||
decreaseToZero :: Int -> Int
|
||||
decreaseToZero x = max 0 (x - 1)
|
||||
|
||||
safeHead :: [a] -> Maybe a
|
||||
safeHead (x:_) = Just x
|
||||
safeHead _ = Nothing
|
||||
|
||||
Reference in New Issue
Block a user