Generalized solution for project euler #1 in haskell with recursion checkIfMultiple x [] = False
checkIfMultiple x (n:ns) = x `mod` n == 0 || checkIfMultiple x ns

findMultiples limit ns = [x | x &lt;- [0..limit], checkIfMultiple x ns]

sumMultiples limit ns = sum (findMultiples limit ns)

sumMultiples 999 [3, 5]
Things I am curious about:

Passing down limit and ns from sumMultiples to findMultiples might be redundant. I was wondering, if I could somehow use composition here or some other shortcut.

What is the convention regarding writing out the type in Haskell? Is it always recommended?


Any other suggestion is appreciated, thank you.
I decided to do euler1 before looking at your solution and this is what I came up with:
euler1 :: [Int] -&gt; Int -&gt; Int
euler1 ns limit =
  sum .
  filter (\x -&gt; any (\n -&gt; x `mod` n == 0) ns) .
  take limit $
  [0..]

So my answers to your questions are:

Yes, composition helps cut down on the things you have to name, and thus on the things you have to pass along to intermediate functions.
Haskell loves lists, and [0..] is often a nice starting point for a composition chain.
Your checkIfMultiple recursion is good, but you will often find a very short synonym for this type of thing (common operations on a list) in base (eg all).
Types are awesome.
List comprehensions are amazing but they can sometimes interrupt a good compositional chain, compared with the equivalent filters and/or fmaps.