erlang 中 and(,) 和or(;)的巧妙利用:
init([Type]) when Type == 'connect'; Type == 'page'; Type == 'request' ->
when后面的条件是“or的”关系
init([Type]) when Type == 'connect',Type == 'page',Type == 'request' ->
when后面的条件是“and的”关系
388 if
389 Type1 == invalid ->
390 invalid;
391 Class == request; Filter == any ->
392 %% The iq record is a bit strange. The sub_el field is an
393 %% XML tuple for requests, but a list of XML tuples for
394 %% responses.
395 FilteredEls = xml:remove_cdata(Els),