Skip to content

Instantly share code, notes, and snippets.

@wingyplus
Created September 22, 2018 11:33
Show Gist options
  • Save wingyplus/fd548c003ca1a5c6d4da74cf60822ca8 to your computer and use it in GitHub Desktop.
Save wingyplus/fd548c003ca1a5c6d4da74cf60822ca8 to your computer and use it in GitHub Desktop.
Hangman implementation in Elixir
defmodule Hangman do
def hangman(secret_word, inputs) do
MapSet.subset?(MapSet.new(String.graphemes(secret_word)), MapSet.new(inputs))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment