Fix typo in takeWhile