hd() vs [H|T]

David N. Welton <>
Tue Jun 29 18:02:41 CEST 2004


Hi,

Someone who was kind enough to take a moment to critique my Hecl code 
mentioned that [H|_T] is faster than hd().  Is it that much faster that 
it warrants using a temporary variable where one might otherwise use 
foo(hd(Bar)) ?

Thankyou,
-- 
David N. Welton




More information about the erlang-questions mailing list