Util
Description
Some minor utility functions
boolToInt :: Bool -> Int Source #
Return True for 1 and otherwise False
True
1
False
safeHead :: [a] -> Maybe a Source #
Safely attempt to return the head of a list
safeTail :: [a] -> [a] Source #
Return the tail of a list, behaving as the identity function upon an empty list
findIndexes :: Eq a => [a] -> a -> [Int] Source #
Return all the positions that a value occurs within a list