RosettaCodeData/Task/Binary-strings/Haskell/binary-strings-3.hs

9 lines
213 B
Haskell

{- As strings are equivalent to lists
of characters in Haskell, test and
see if the given string is an empty list -}
strIsEmpty :: String -> Bool
strIsEmpty x =
if x == []
then True
else False