implemented TakeWhile.