[Community puzzle] Bulk Email Generator

That’s because I’m explaining it bad, and stupid human convention to index at 1 for ordinals makes it worse.

The general idea is: you take the choices in order, not skipping any (i.e., starting with the “first”), looping when you move past the end.

Expressed mathematically involves actually using 0-based indices, so:

  • When it’s the [human] 4th choice and there are only 2 clauses, you pick clause [sane] 3 mod 2 = 1. Which translates to “second” in human terms.
  • When it’s the [human] 3rd choice and there are only 2 clauses, you pick clause [sane] 2 mod 2 = 0. Which translates to “first” in human terms.

But I think understanding the general idea is more important than reading the math.

So indeed “Does it (wrap|unwrap)” should unwrap.

1 Like