I have three functions that find the nth element of a list:
nthElement :: [a] -> Int -> Maybe a nthElement [] a = Nothing nthElement (x:xs) a | a <= 0
I know this is question about style for explicitly recursive functions, but I would suggest that the best style is finding a way to reuse existing recursive functions instead.
nthElement xs n = guard (n > 0) >> listToMaybe (drop (n-1) xs)