getting a whole record in a function call when only a field is be ing matched
Mon Aug 30 17:23:21 CEST 2004
when compile the function as below the compiler raises 'illegal pattern'.
Isn't it a valid construct, or it must be formulated other way?
I have to move the == check to 'when' guard, then it compiles, but looks
less nice, isn't it?
fun(State) when State#state.length==unknown ->
More information about the erlang-questions