<div dir="ltr">Hi,<br><br>I am confused by the grammar of split_binary/2 in the example of mp3_sync in the book "Programming Erlang",<br><br>get_word(N, Bin) -><br>   <b><i> {_,<<C:4/binary,_/binary>>} = split_binary(Bin, N), C.</i></b><br>
<br>I understand that <i>@spec split_binary(Bin, Pos)</i> -> {Bin1, Bin2} but how does the above clause work ? How does it make C get the first 4 bytes of Bin starting from N ?<br><br>Thanks!<br></div>