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

Version Path
trackler-2.2.1.180 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.179 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.178 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.177 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.176 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.175 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.174 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.173 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.172 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.171 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.170 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.169 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.167 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.166 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.165 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.164 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.163 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.162 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.161 tracks/haskell/exercises/house/examples/success-standard/src/House.hs
trackler-2.2.1.160 tracks/haskell/exercises/house/examples/success-standard/src/House.hs