Sha256: 8a33310411539efb1852967170626fd698e4a9ab58d88a3a9a9e4580d3e97231
Contents?: true
Size: 530 Bytes
Versions: 66
Compression:
Stored size: 530 Bytes
Contents
defmodule Alphametics do @type puzzle :: binary @type solution :: %{required(?A..?Z) => 0..9} @doc """ Takes an alphametics puzzle and returns a solution where every letter replaced by its number will make a valid equation. Returns `nil` when there is no valid solution to the given puzzle. ## Examples iex> Alphametics.solve("I + BB == ILL") %{?I => 1, ?B => 9, ?L => 0} iex> Alphametics.solve("A == B") nil """ @spec solve(puzzle) :: solution | nil def solve(puzzle) do end end
Version data entries
66 entries across 66 versions & 1 rubygems