title: Haskell function that substitutes a DNA base
body: <p>I am trying to create a function in Haskell that substitutes a DNA base with another base. This is what my function is. When I run the test, I get <code>False</code> rather than <code>True</code>. I am not sure what I could be doing wrong with this function.</p>
  <pre><code>bases = &quot;AGCT&quot;
  substitutions :: String -&gt; [String]
  substitutions &quot;&quot; = []
  substitutions (c:cs) = ((map (:cs)) bases) ++ (map (c:) (substitutions cs))
  
  p12tests = [substitutions &quot;ACT&quot; == [&quot;ACT&quot;,&quot;AAT&quot;,&quot;ACA&quot;,&quot;GCT&quot;,&quot;AGT&quot;,&quot;ACG&quot;,&quot;CCT&quot;,&quot;ACT&quot;,&quot;ACC&quot;,&quot;TCT&quot;,&quot;ATT&quot;,&quot;ACT&quot;]]
  </code></pre>