Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment