How best to test for a String for being empty or populated with just white space in Haskell?
haskell, string
Solution
import Data.Char (isSpace)
myFunc :: String -> Bool
myFunc = all isSpace
Problem
What is a good practice method performing the following logic? `myFunc :: String -> Bool` ``` myFunc "" True myFunc " " -- can be space or any other whitespace True myFunc " some text " False ``` I had an idea of performing a trim, then checking if `result==""`, but this seems very roundabout.