Skip to content

Instantly share code, notes, and snippets.

@PragTob

PragTob/board.ex

Created Jun 16, 2019
Embed
What would you like to do?
Board behaviour
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
You can’t perform that action at this time.