Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on FizzBuzz in Haskell [pdf]. Parent comment
If both tests fail, return the 'id' function which when applied to (show n) will return the number as a string.
If one or both tests succeed, return a 'const' function which will simply return the appropriate string and ignore the (show n).
This example was illuminating. It helped me realize I'm wasting too much time with Haskell.
There are no comments on this comment yet.
If both tests fail, return the 'id' function which when applied to (show n) will return the number as a string.
If one or both tests succeed, return a 'const' function which will simply return the appropriate string and ignore the (show n).
This example was illuminating. It helped me realize I'm wasting too much time with Haskell.