You can use atoms where enums are used in other languages. For example, you could:
# use an atom-value tuple to mark the value '0..5' as a range
{ :range, 0..5 }
# group atoms together to represent a more involved enum
question = { :question, { :range, 0..5 }, { :text, "blah" } }
# use the position of an element to implicitly determine its type.
question = { :question, 0..5, "blah" }
You can use pattern matching here like so:
def verify_answer(question = { :question, range, text }, answer) do
assert answer in range
end