Add 'fold' and 'doWhen' functions, update README.md