pass n-ary to generator