Skip to content

Instantly share code, notes, and snippets.

@colorbox
Created May 18, 2017 06:59
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 colorbox/f737c8bd60a288c897f4d7c537fcd9df to your computer and use it in GitHub Desktop.
Save colorbox/f737c8bd60a288c897f4d7c537fcd9df to your computer and use it in GitHub Desktop.
list = "AAAA"
(for x <- String.split(list,"")|>Enum.drop(-1), do: ([0,0,0] ++ Integer.digits(elem(Code.eval_string("0x"<>x),0),2))|>Enum.take(-4) )|> List.flatten()|> Enum.join()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment