Changes resulting from unit test code-review.
WIP: step 18 - corrected mistakes in unit test - forgot that the initial value supplied to a fold can't be transformed (in contrast to the values folded over), also bolstered the test to check ordering of items and added a test for 'toArray'. First version of implementation that passes this test, not seriously optimized.