Created
June 16, 2019 15:40
-
-
Save PragTob/c38269e5e1b9eb7b8f6c3bf46d0b9e0c to your computer and use it in GitHub Desktop.
Board behaviour
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 Board do | |
# can't be more specific witht types as each implementation has its own representation | |
@type board :: any | |
@type field :: any | |
@callback new() :: board | |
@callback get(board, non_neg_integer, non_neg_integer) :: field | |
@callback set(board, non_neg_integer, non_neg_integer, field) :: board | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment