News for hackers. Stuff that matters.
Re:Comparing k-NN in Rust by AaronFriel on Tuesday June 10, 2014 @06:16PM (#7875633)
If zip is following the 'functional' definition, it should only return a list of the length of the shorter of the two inputs. In Haskell:

    zip :: [a] -> [b] -> [(a, b)]
Not:

    zip :: [a] -> [b] -> [(Maybe a, Maybe b)]
If you want to allow processing a sequence of tails, you could have:

    zipWithTail :: [a] -> [b] -> ([(a, b)], Either [a] [b])
Which would return a list of pairs and a list of either the tail of the first or the second input, whichever was longer.
Re:Comparing k-NN in Rust by pcwalton on Tuesday June 10, 2014 @06:42PM (#7875726)
It is following that definition, but the issue is that it's built on iterators, which are of unknown length. Haskell would have effectively the same checks if built on lists because of the way lazy thunks work.