Implement unfold via Option fns. Closes #325.

I raised an issue for this because I wasn't sure whether my line of thinking was right, so I wanted clarification just the same.

Now I've gone ahead and raised a pull request for the same. I'm still unsure as to whether this is considered OK, so please go ahead and reject if that isn't the case.