title: Manual evaluation of `belongs 'a' ['a', 'b', 'c']`
body: <p>I'm trying to manually evaluate <code>belongs 'a' ['a', 'b', 'c']</code> where:</p>
  
  <pre><code>cuts :: [a] -&gt; [([a],[a])]
  cuts xs = zipWith splitAt [0..length xs] (repeat xs)
  
  belongs x = any ((==x) . head . snd) . init . cuts
  </code></pre>
  
  <p>I start by evaluating <code>cuts ['a', 'b', 'c'] = [("","abc"),("a","bc"),("ab","c"),("abc","")]</code></p>
  
  <p>Then I apply <code>init</code> to the output of <code>cuts</code>:</p>
  
  <pre><code>init [("","abc"),("a","bc"),("ab","c"),("abc","")] = [("","abc"),("a","bc"),("ab","c")]
  </code></pre>
  
  <p>but then I get confused on how GHCi continue the evaluation.</p>
  
  <p>PS: Note that <code>belongs</code> has the same semantics as <code>Prelude.elem</code>.</p>