corrected spec descriptions
factored out iterator generation
added type annotations for recursion
added support for choose more than one