@megawac 's slimmer takeWhile