title: Separating an atom name separated by dash in Prolog
body: <pre><code>functor([a1-b1,a2-b2,a3-b3,a4-b4]).
  </code></pre>
  
  <p>I need to separate a's and b's and construct new two functors like</p>
  
  <pre><code>functora([a1,a2,a3,a4]),
  functorb([b1,b2,b3,b4])
  </code></pre>