title: Remove the first and the last element from a list in Haskell
body: <p>I am writing a small function which can help me get rid of the first and last element of a list. This is what I am trying to do:</p>
  
  <pre><code>&gt;firstLast::[a]-&gt;[a]
  &gt;firstLast [x] = [ ]
  &gt;firstLast h:t = [i|i!= head[a] || i!= last[a]]
  </code></pre>
  
  <p>As you can see I am trying to use list comprehension here,but apparently I didn't use it properly. </p>