Avoid newbie record redundancy?

Andrew Lentvorski bsder@REDACTED
Sat May 27 14:12:41 CEST 2006

This is almost certainly a newbie question.  I have the following code:

match_queue(MasterQueue) ->
	 #rcdPeerMaster{returnSocket=Socket, masterIP=MasterIP, masterPort=MasterPort}} ->
	    QItem = #rcdPeerMaster{returnSocket=Socket, masterIP=MasterIP, masterPort=MasterPort},
	    match_queue(queue:in(QItem, MasterQueue));
	_ ->
	    ?elog("HELP!~n", [])

Is it possible to still do the match on rcdPeerMaster while not
unpacking and then repacking everything?  That seems like a lot of
needlessly duplicated code.


More information about the erlang-questions mailing list