function takeWhile(predicate, list) {
			for (let i = 0; i < list.length; ++i) {
				if (!predicate(list[i])) {
					return list.slice(0, i);
				}
			}
			return list.slice();
		}
Gets the leading sequence of members in a list that pass the predicate.
@param {Function} predicate ([a] -> Boolean) the function used to make the determination
@param {a[]} list the input list
@returns {a[]} the leading sequence of members in the given list that pass the given predicate