Created
September 22, 2018 11:33
-
-
Save wingyplus/fd548c003ca1a5c6d4da74cf60822ca8 to your computer and use it in GitHub Desktop.
Hangman implementation in Elixir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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