Personal tools

Haskell Quiz/DayRange

From HaskellWiki

< Haskell Quiz(Difference between revisions)
Jump to: navigation, 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.

[edit] 1 The Problem

[edit] 2 Solutions