Old lady swallowed a fly: Difference between revisions
→{{header|Haskell}}: shorter
(→{{header|Java}}: use template) |
(→{{header|Haskell}}: shorter) |
||
Line 1,053:
,"cat.\t\nImagine that. She swallowed a cat."
,"dog.\t\nWhat a hog to swallow a dog."
,"goat.\t\nShe just opened her throat and swallowed
,"cow.\nI don't know how she swallowed
,"horse.\nShe's dead, of course."]
beginnings = map ("There was an old lady who swallowed a "++) animals
| (x:y:_:_)<-tails animals]
main = putStr $ concatMap unlines $ zipWith (:) beginnings $
{{out}}<pre>There was an old lady who swallowed a fly.
I don't know why she swallowed a fly.
|