Skip to content

Instantly share code, notes, and snippets.

@defndaines
Created October 28, 2015 11:36
Show Gist options
  • Save defndaines/0f16c11f13fb69980026 to your computer and use it in GitHub Desktop.
Save defndaines/0f16c11f13fb69980026 to your computer and use it in GitHub Desktop.
resolve(Str) ->
lists:foldl(fun combine/2, [""], Str).
combine($?, Acc) ->
[E ++ [N] || E <- Acc, N <- "01"];
combine(C, Acc) ->
[E ++ [C] || E <- Acc].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment