Sha256: 1f4343e2ca60db54511338117dd10d16e792d77b10655ee1610e133f2e0a963e
Contents?: true
Size: 714 Bytes
Versions: 396
Compression:
Stored size: 714 Bytes
Contents
module House (rhyme) where import Data.List (intercalate) rhyme :: String rhyme = intercalate "\n" $ map ("This is " ++) $ scanl1 f pieces where f tail' piece = piece ++ ' ' : tail' pieces :: [String] pieces = [ "the house that Jack built.\n" , "the malt\nthat lay in" , "the rat\nthat ate" , "the cat\nthat killed" , "the dog\nthat worried" , "the cow with the crumpled horn\nthat tossed" , "the maiden all forlorn\nthat milked" , "the man all tattered and torn\nthat kissed" , "the priest all shaven and shorn\nthat married" , "the rooster that crowed in the morn\nthat woke" , "the farmer sowing his corn\nthat kept" , "the horse and the hound and the horn\nthat belonged to" ]
Version data entries
396 entries across 396 versions & 1 rubygems