title: Spliting a String in a List based on its characters
body: <p>I am new to Haskell and also to Functional Programming. I came across an exercise(from my course) that I have a function <code>String-&gt; [String]</code> that is being used to call any other function I have written in order to remove all the non-alphabetic characters. I have managed to do that,but if I were to call <code>splitWord &quot;I ne5ed help&quot; </code> I would get every character splited as an element <code>[&quot;I&quot;,&quot;n&quot;,&quot;e&quot;,&quot;e&quot;,&quot;d&quot;,&quot;h&quot;,&quot;e&quot;,&quot;l&quot;,&quot;p&quot;]</code>,but I need to have an output List as that : <code>[&quot;I&quot;,&quot;ne&quot;,&quot;ed&quot;,&quot;help&quot;]</code>
  This is my code :</p>
  <pre><code>splitword :: String -&gt; [String]
  splitword s = looplist s s
  
  looplist :: String -&gt; String -&gt; [String] --loop through the string and create a list.
  looplist (h:t) x
      |((check [h]) == &quot;&quot; )= looplist t x --remove the &quot;&quot; added by check function.
      |otherwise=[h] : looplist t x  
  looplist [] x = []
  
  check :: [Char] -&gt; [Char]
  check x
      | (x &lt;= &quot;z&quot;) &amp;&amp; (x &gt;= &quot;a&quot;) = x
      | (x &lt;= &quot;Z&quot;) &amp;&amp; (x &gt;= &quot;A&quot;) = x
      |otherwise = []
  </code></pre>
  <p>I am supposed to not use ONLY the <code>where</code> keyword,and only the basic operators(e.g for Lists <code>:</code>,<code>+</code>). No imports or any other built-in function.</p>
  <p>As I said, I can use my <code>check</code> function to filter every letter,but my problem is that the output wouldn't be what I actually want. I am confused about how to actually fix that. Any suggestions?</p>