init implementation and tests

Had a real world situation where I wanted all elements of a list except the last one.

In Haskell, the four usual suspects are `head`, `tail`, `init`, and `last`.

Could find `head`, `tail`, and `last` but no init implementation? It is possible it comes under a different name but I couldn't find it.  Also, lodash does have an initial function which is sort of haskell `init` on steroids.

So I am tentatively raising this PR without any expectations, but hopes such a function already exists if declined. Would rather not have to compose this one all the time. :)

My only concern over the proposed implementation was what to do about the case where an empty array is passed in. Am assuming here that returning an empty array is ok. This seems consistent with `tail` etc.


@davidchambers did play around with your suggestion but decided to go with what is provided above. If you are comfortable merging the code as-is for a v1 and then subsequently refactoring if you see a better approach then that's all good. To be honest, i wasn't quite sure how to take what you were proposing any further.

Have flipped the Actual / Expected arguments ordering around for the test case as requested.