In Haskell, what's the difference between using takeWhile or using a “regular” inequality in this list comprehension?
问题 I'm trying to learn me a Haskell (for great good), and one of the many different things I'm doing is trying to tackle some Project Euler problems as I'm going along to test my mettle. In doing some of the Fibonacci based problems, I stumbled on and started playing around with the recursive infinite list version of the Fibonacci sequence: fibs = 1 : 2 : zipWith (+) fibs (tail fibs) For one of the PE problems, I needed to extract the subsequence of even Fibonacci numbers less than 4,000,000. I