Add fix bug in terminal destruction effects

This commit is contained in:
2022-06-07 01:25:36 +01:00
parent 1fe41889fe
commit d42538e3c0
13 changed files with 111 additions and 93 deletions
+4
View File
@@ -53,6 +53,10 @@ safeHead :: [a] -> Maybe a
safeHead (x:_) = Just x
safeHead _ = Nothing
safeUncons :: [a] -> Maybe (a,[a])
safeUncons (x:xs) = Just (x,xs)
safeUncons _ = Nothing
errorHead :: String -> [a] -> a
errorHead _ (x:_) = x
errorHead s [] = error s