title: Haskell: Is there a left-side identity for the infix (`:`) operator?
body: <p>In other words, what syntax (if any) could I use in place of <code>XXX</code> in the following implementation of filter:</p>
  
  <pre><code>filter' :: (a -&gt; Bool) -&gt; [a] -&gt; [a]
  filter' _ []     = []
  filter' f (x:xs) =
    let n = if f x then x else XXX
    in  n:(filter' f xs)
  </code></pre>
  
  <p>I'm aware of the following alternative implementation (which is recursive and only prepends) but would still be curious if the infix operator has a LHS identity.</p>
  
  <pre><code>filter' :: (a -&gt; Bool) -&gt; [a] -&gt; [a]
  filter' _ []     = []
  filter' f (x:xs)
    | f x = x:(filter' f xs)
    | otherwise = filter' f xs
  </code></pre>