<div dir="ltr">For lists there is no way. For binaries it is actually possible using guards:<div><br></div><div>currency_to_credits({cur, V}, Acc) when binary_part(V, {byte_size(V), -3}) == <<"CHF">>,</div><div>                                        binary_part(V, {0, byte_size(V) - 3}) >= <<"1000">>,</div>                                        binary_part(V, {0, byte_size(V) - 3}) =< <<"10000">> -><div>  {chf, Acc + binary_to_integer(binary:part(V, {0, byte_size(V) - 3}))};</div><div>...</div><div><br></div><div>However, I would argue that it's much more readable if you split the binary in currency_to_credits and pass on the parts to a helper function that handles the logic.</div><div><br></div><div>Regards,</div><div>/Håkan</div></div>