I'd like a more elegant way to write the following two functions, ideally in one :
applyOperatorBetweenVariableLists:: [Variable] -> String -> [Variable] -> [Variable]
applyOperatorBetweenVariableLists firstList operator secondList = concat $ map (test firstList operator) secondList
test:: [Variable] -> String -> Variable -> [Variable]
test firstVariables operator secondVariable = concat $ map (applyOperatorBetweenVariables secondVariable operator) firstVariables
The declaration of applyOperatorBetweenVariables is :
applyOperatorBetweenVariables:: Variable -> String -> Variable -> [Variable]
I'm quite sure there must be a Prelude Function that does exactly this, or a very elegant way to write it.