I noticed that in these two years, no-one had gone ahead an written a Haskell version of the task. So I went ahead and did it. Code below.
I had to learn a bit about Haskell date and calendar handling, looping, monads, and comprehensions before succeeding. But RosettaCode and #haskell
were both good sports.
I've optimized for clarity. The isFriday
condition doesn't need to be pulled out into its own function, but I felt it helped readability a bit.
import Data.Time.Calendar
import Data.Time.Calendar.WeekDate
isFriday :: Day -> Bool