Append Tuple to Two `Maybe []` The following function appends a tuple to two Maybe [a]'s.

tupleToMaybeList :: (a, a) -&gt; Maybe [a] -&gt; Maybe [a] -&gt; Maybe [a]
tupleToMaybeList (a, b) cs ds = do
    x  &lt;- return a
    y  &lt;- return b
    xs &lt;- cs
    ys &lt;- ds
    return ((x : y : xs) ++ ys)


Please critique it for idiomatic Haskell-ness.
There's a bit of redundancy in your implementation. b &lt;- return a is effectively the same as let b = a. There's no need to &ldquo;inject&rdquo; pure values into a monadic context with return, a pure value in scope is a pure value in scope so just use a and b in place of your x and y.

The parentheses around x : y : xs are also technically redundant. Regardless of the ordering of the application of x : y : and xs ++ ys you'll still end up with the same list. This is always the case for list cons and append, if you think about it you should see why. Note that the fixity precedence for both functions is infixr 5.

prependTupleConcatMaybeLists :: (a, a) -&gt; Maybe [a] -&gt; Maybe [a] -&gt; Maybe [a]
prependTupleConcatMaybeLists (a, b) cs ds =
  do xs &lt;- cs
     ys &lt;- ds
     return $ a : b : xs ++ ys


I do question the necessity of writing this particular function. Concatenating cs and ds should probably be taken care of separately to prepending a tuple to a list. E.g.,

prependTupleMaybe :: (a, a) -&gt; Maybe [a] -&gt; Maybe [a]
prependTupleMaybe (a, b) xs = fmap (a:b:) xs

-- call site: let zs = liftA2 (++) (prependTupleMaybe pair xs) ys
-- or       : let zs = prependTupleMaybe pair (liftA2 (++) xs ys)