[erlang-questions] Binary pattern matching

Valentin Micic v@REDACTED
Sat Oct 19 15:39:44 CEST 2019

My sincere apology if this has been discussed before…
I vaguely remember that a number of years ago, one was able to write something like this:

some_function( Offset, <<_:Offset/binary-unit:8, Value/binary>> ) -> …

without (Erlang R21.1) compiler complaining with: variable Offset unbound

Was I dreaming? 

Thanks in advance


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191019/9b2e43e4/attachment.htm>

More information about the erlang-questions mailing list