Modify chain() to be lazy.

Closes #27