title: Erlang search for specific element in list of records
body: <p>I have defined 2 records:</p>
  
  <pre><code>-record(state, {port = 9921,
                  clients = []
                 }
          ).
  
  -record (client, {pid,
                    acc}).
  </code></pre>
  
  <p>And I have created variable which contains port and 3 records:</p>
  
  <pre><code> State = #state{port = 9921, 
                  clients = []},
   NewClient1 = #client{pid = "A", acc = &lt;&lt;85&gt;&gt;},
   NewClient2 = #client{pid = "B", acc = &lt;&lt;73&gt;&gt;},
   NewClient3 = #client{pid = "C", acc = &lt;&lt;56&gt;&gt;},
   NewState = State#state{clients = [NewClient1 , NewClient2, NewClient3]},
  </code></pre>
  
  <p>NewState now contains </p>
  
  <pre><code>#state{port = 9921,
     clients = [#client{pid = "A",acc = &lt;&lt;"U"&gt;&gt;},
                #client{pid = "B",acc = &lt;&lt;"I"&gt;&gt;},
                #client{pid = "C",acc = &lt;&lt;25&gt;&gt;}]}
  </code></pre>
  
  <p>My question is, I want to search record state for some specific pid, example: I want to get true for function find ("B", NewState) and false for function find ("Z", NewState). What is most easiest way to do it?</p>