Skip to content

Instantly share code, notes, and snippets.

@patrickgombert
Last active August 29, 2015 14:04
Show Gist options
  • Save patrickgombert/7cb2290c2cab657747f7 to your computer and use it in GitHub Desktop.
Save patrickgombert/7cb2290c2cab657747f7 to your computer and use it in GitHub Desktop.
concat binaries
iex(1)> a = << 0 :: size(10) >>
<<0, 0::size(2)>>
iex(2)> b = << 0 :: size(10) >>
<<0, 0::size(2)>>
iex(3)> << a :: size(10), b :: size(10) >>
** (ArgumentError) argument error
iex(3)> << a :: binary, b :: binary >>
** (ArgumentError) argument error
iex(3)> a <> b
** (ArgumentError) argument error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment