I have one suggestion: > sumCheck total (x:xs) ys = if total' == Nothing > then sumCheck total xs ys > else return (x, (ys !! ( fromJust total'))) > where total' = (total - x) `elemIndex` ys I might write this: > sumCheck total (x:xs) ys = > let diff = total - x > in if diff `elem` ys > then Just (x, diff) > else sumCheck total xs ys Cheers, A