pNre/ExSwift — pull request #4 by zolrath (2014-06-13 06:51:56+00:00)
Title: Add takeWhile and skipWhile to Array

`takeWhile` and `skipWhile` allow taking or skipping array elements that meet a given condition.

(I'd rename `skip` to `drop` in order to match the function names of other languages but I'll leave that decision up to you)

````
[1, 2, 3, 4, 5, 2].takeWhile { $0 < 4 }
// → [1, 2, 3]

[1, 2, 3, 4, 5, 2].skipWhile { $0 < 4 }
// → [4, 5, 2]
`````