exercism/elixir/chessboard/lib/chessboard.ex

7 lines
183 B
Elixir

defmodule Chessboard do
def rank_range, do: 1..8
def file_range, do: ?A..?H
def ranks, do: rank_range() |> Enum.to_list
def files, do: file_range() |> Enum.map(&(<<&1>>))
end