Difference between revisions of "Haskell Quiz/DayRange"

From HaskellWiki
Jump to navigation Jump to search
m
 
(+cat)
 
Line 14: Line 14:
   
 
* [[Haskell Quiz/DayRange/Solution Jethr0|Jethr0]]
 
* [[Haskell Quiz/DayRange/Solution Jethr0|Jethr0]]
  +
  +
[[Category:Haskell Quiz|DayRange]]

Latest revision as of 10:32, 13 January 2007

DayRange (#92)

If you've ever created a web application that deals with scheduling recurring events, you may have found yourself creating a method to convert a list of days into a more human-readable string.

For example, suppose a musician plays at a certain venue on Monday, Tuesday, Wednesday, and Saturday. You could pass a list of associated day numbers to your object or method, which might return "Mon-Wed, Sat".

The purpose of this quiz is to find the best "Haskell way" to generate this sentence-like string.

The Problem

Solutions