<div dir="ltr"><div>Hi,<br><br></div><div>I needed a function that returns True/False if a list of strings are in a given string. I made one function below (works fine),..but I was wondering whether there is a shorter way?<br><br><br>-- |Returns True if one of given strings are contained in given string<br>contains :: [String] -> String -> Bool<br>contains elements seach_elem<br>   | trueListCount == 0 = False<br>   | otherwise = True<br>   where<br>      isInStringList = [isInfixOf elem seach_elem | elem <- elements]<br>      onlyTrueList = [elem | elem <- isInStringList, elem == True]<br>      trueListCount = length onlyTrueList<br><br><br></div><div>Cheers, <br></div><div>-m<br></div></div>