title: head and tail in Elixir
body: <p>I am working elixir and trying to achieve data in some specific form with head and tail method. </p>
  
  <p>I have this kind of data <code>["09:89-87:45", "23:23-23:23", "65:65-23:04"]</code></p>
  
  <p>With doing head and tail? can i get this data into <code>[["09:89-87:45"], ["23:23-23:23"], ["65:65-23:04"]]</code> form?</p>
  
  <p>What I am doing right now is not working good.</p>
  
  <pre><code>iex(14)&gt; defmodule Gy do                                                
  ...(14)&gt;   def get_head_tail([head|tail]) do
  ...(14)&gt;    [[head], get_head_tail(tail)]       
  ...(14)&gt;   end
  ...(14)&gt;   def get_head_tail([]) do
  ...(14)&gt;     []
  ...(14)&gt;   end
  ...(14)&gt; end
  </code></pre>
  
  <p>it returns as <code>[["09:89-87:45"], [["23:23-23:23"], [["65:65-23:04"], []]]]</code>
  anyhelp will be appreciated.</p>