Initial upload

This commit is contained in:
2022-08-24 14:28:45 +02:00
parent c67653ddee
commit 57bc7b0289
370 changed files with 18479 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
defmodule ResistorColor do
@resistors %{
black: 0,
brown: 1,
red: 2,
orange: 3,
yellow: 4,
green: 5,
blue: 6,
violet: 7,
grey: 8,
white: 9
}
@doc """
Return the value of a color band
"""
@spec code(atom) :: integer()
def code(color) when is_map_key(@resistors, color) do
@resistors[color]
end
end