articles icon indicating copy to clipboard operation
articles copied to clipboard

zipWith question: drop in splitMiddle

Open TysonMN opened this issue 3 years ago • 0 comments

This is a question about your zipWith article.

In your implementation of splitMiddle, did you use

secondHalf = zipOverflow firstHalf xs

instead of something like

secondHalf = drop (length firstHalf) xs

because the former only enumerates once while the second enumerates twice?

TysonMN avatar Aug 08 '22 11:08 TysonMN