[Haskell-cafe] Re: Embedding newlines into a string?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Apr 14 10:22:50 EDT 2008
On Apr 14, 2008, at 7:51 , Benjamin L. Russell wrote:
> hanoi_shower :: Show a => [(a, a)] -> String
> hanoi_shower [(a, b)] = "Move " ++ show a ++ " to " ++ show b ++ "."
You've just specified via pattern match that hanoi_shower always gets
a 1-element list. Is that really what you intended?
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe