fixed generic version of Function0 generator