Skip to content

Instantly share code, notes, and snippets.

@jfreeze
Created August 21, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfreeze/e20c5eec46e07038d6b2 to your computer and use it in GitHub Desktop.
Save jfreeze/e20c5eec46e07038d6b2 to your computer and use it in GitHub Desktop.
Binary pattern matching
iex(5)> <<"fred", ?\n>>
"fred\n"
iex(6)> << x, ?\n>> = "fred\n"
** (MatchError) no match of right hand side value: "fred\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment