Note that
either passes on its continuation twice,
once to each its two alternatives, gen1 and gen2.

queens n can be read as,
"do the following n times (doo n),
choose an int between 1 and n inclusive (choose n)
and (pipe)
check that it does not invalidate the
problem's constraints (filter valid)
given the previous choices."