[erlang-questions] questions about dict

Dustin Sallings dustin@REDACTED
Tue Aug 21 07:43:38 CEST 2007


	There are a couple of things about dict I'm working around in some  
of my programs and was wondering if there's a better way or something.

	1)  There doesn't seem to be a way to get the length of a dict  
directly, although it seems to be directly stored (I'm using fold  
right now to calculate it).

	2)  I can't seem to make a guard for a dict because the record  
format is unavailable to me at compile time (I'm working around this  
by matching tuple and hard-coding a tuple pattern for identifying a  
dict).

	Is there a better way to do either of these?

-- 
Dustin Sallings





More information about the erlang-questions mailing list