Elixir basic crash course
create_deck | Create an array of playing cards |
shuffle | Shuffle an array of playing cards |
deal | Create a 'hand' of cards |
contains? | Given a deck and a single card, figure out if the cards is in the deck |
save | Save a collection of cards to a file on the local machine |
load | Load a collection of cards from the local machine |
$ mix new cards
$ cd cards
$ mix deps.get
$ mix docs
$ mix test
$ firefox doc/index.html
$ iex -S mix
$ iex> Cards.create_deck
$ recompile
$ deck = Cards.create_deck
$ Cards.shuffle(deck)
$ recompile
Cards.contains?(deck, "Two")
Cards.save(deck, 'my_deck')