title: Basic example of Map in Erlang
body: <p>Day 2 of learning Erlang. I am trying to learn the basics of using Map in Erlang by creating a simple map function that takes in any predicate and list (passed in by the user) and checks if the the predicate returns true or false and stores the result in the list.</p>
  
  <p>So if the user passes in <code>(&gt; 3)</code> as the predicate and the list contains <code>[3,4,5]</code> the desired output would be <code>[false, true, true]</code>.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>applyMap (P, LST) -&gt; lists:map(P LST).  
  </code></pre>
  
  <p>I appreciate any suggestions on how to do this.</p>
  
  <p>Many thanks in advance! </p>