I'm trying to write a haskell function that takes in two lists of integers and generates a list with elements that have been taken alternatingly from the two lists.
I have the function:
blend xs ys
An example:
blend [1,2,3] [4,5,6]
should return
[1,4,2,5,3,6]
My logic is to zip the two lists together, generating the pairs of alternate elements, then somehow remove them from their tuples.
It's removing them from their tuples that I can't figure out how to implement.
[homework]
question that continues on in the original direction is particularly helpful (unless the direction was completely wrong, which, in this case, it wasn't). – Expiry