Old lady swallowed a fly: Difference between revisions
Content added Content deleted
(Added BBC BASIC) |
(Frege and Haskell: concatMap is much more elegant) |
||
Line 736: | Line 736: | ||
{{trans|Haskell}} |
{{trans|Haskell}} |
||
{{Works with|Frege|3. |
{{Works with|Frege|3.23.888-g4e22ab6}} |
||
Nearly identical to the Haskell. Only the first |
Nearly identical to the Haskell. Only the first line of the program is different. |
||
<lang frege>module OldLady where |
<lang frege>module OldLady where |
||
Line 778: | Line 778: | ||
song :: [String] |
song :: [String] |
||
song = |
song = concatMap verse $ tail $ reverse $ tails animals |
||
main |
main = putStr $ unlines song</lang> |
||
=={{header|Go}}== |
=={{header|Go}}== |
||
Line 822: | Line 822: | ||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
⚫ | |||
{{Works with|GHC|7.8.3}} |
|||
⚫ | |||
import Data.List |
import Data.List |
||
Line 860: | Line 863: | ||
song :: [String] |
song :: [String] |
||
song = |
song = concatMap verse $ tail $ reverse $ tails animals |
||
main = putStr $ unlines song</lang> |
main = putStr $ unlines song</lang> |