Fold semantic checking over collection

Rather than using the fold to build a chain of semantic check functions.
This reduces the stack requirements for semantic checking.