span method
Return a record where first element is longest prefix (possibly empty) of this Iterable
with elements that satisfy test
and second element is the remainder of the Iterable.
Implementation
(Iterable<T>, Iterable<T>) span(bool Function(T t) test) =>
(takeWhile(test), skipWhile(test));