articles
articles copied to clipboard
zipWith question: flip in rotateUntil
This is a question about your zipWith article.
Is flip essential in
rotateUntil p xs = zipWith
(flip const)
xs
(dropWhile (not . p) (cycle xs))
?
My guess is that this can be simplified to
rotateUntil p xs = zipWith
const
(dropWhile (not . p) (cycle xs))
xs
Am I correct?