I'm just curious about the efficiency of pattern matching in Haskell. What is a simple case of where pattern matching would be better than nested if/case statements and then the converse?
Thanks for your help.
...
Ok I want some opinions how I can fix this mess of a method!
It has WAY to many nested 'if' statements.
But realize I have to know exactly where the method fails, currently in each of the respective 'else' clause I am logging the error (the failed 'if' condition').
Note: ignore any logic behind the things, please focus on the style an...
//edit 5
when the i use only these 2 lines
index :: [String] -> [String] -> Bool
index a b = and [x `elem` a |x <- b]
it works fine!!!!
eg:
index ["asd","asdd","dew"] ["asdd","asdad"]
False
But when i use the entire code mentioned below
empty [] = True
empty _ = False
index a b = do
if empty a
...