The positionally exact answer tuple for a tuple of questions.
The positionally exact answer tuple for a tuple of questions.
Tuple.InverseMap is what does the work: given (Question[A], Question[B]) it reduces to (A, B). It only reduces because every Question.* constructor returns the opaque Question[X] itself, uniformly and with an explicit return type.
Ask(urgency, team, frustration) // or Ask((urgency, team, frustration))
One method rather than an overload per arity: Scala tuples the arguments for you. It does not clash with the single-question overload below, whose erased signature differs by the evidence parameter.
IsMappedBy is what rejects a tuple holding something that is not a question.
Zero padded so that lexicographic order matches positional order, which keeps the encoded request readable and its golden tests stable. Padded by hand rather than with f"q$i%02d", because Scala.js implements java.util.Formatter only partially.