Support trailing closure in expect. Closes #3