A yes/no question. The answer is the probability that the answer is yes.
TypeSafe.noul("Does this convey urgency?",
true: "Explicitly time-sensitive",
false: "No urgency expressed"
)TypeSafe's advice: ask for one snap judgment per question. If the instructions need an "and" or a "but", split them into two Nouls.
criteria is optional. When given, it describes what a yes and a no mean;
either description may be a string, map, or list (the API accepts JSON
structure everywhere a description goes).
Summary
Types
@type t() :: %TypeSafe.Question.Noul{ criteria: %{ optional(true) => TypeSafe.Question.description(), optional(false) => TypeSafe.Question.description() } | nil, instructions: TypeSafe.Question.description() }
Functions
@spec new(TypeSafe.Question.description(), keyword() | map()) :: t()
Builds a Noul question.
Options
:true- what a yes (value near 1) means:false- what a no (value near 0) means
Like every constructor here, new/2 does not validate; a misspelled key is
reported as a :validation error by TypeSafe.evaluate/4, or raised by
TypeSafe.Question.validate!/1 when you want to fail early.
@spec wire_type() :: String.t()
The type tag this question and its answer carry on the wire.