Old lady swallowed a fly: Difference between revisions
Content deleted Content added
Line 464: | Line 464: | ||
} |
} |
||
}</lang> |
}</lang> |
||
=={{header|Elena}}== |
|||
<lang elena>#import system. |
|||
#import extensions. |
|||
#symbol Creatures = ("fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse"). |
|||
#symbol Comments = |
|||
( |
|||
"I don't know why she swallowed that fly"#10"Perhaps she'll die", |
|||
"That wiggled and jiggled and tickled inside her", |
|||
"How absurd, to swallow a bird", |
|||
"Imagine that. She swallowed a cat", |
|||
"What a hog to swallow a dog", |
|||
"She just opened her throat and swallowed that goat", |
|||
"I don't know how she swallowed that cow", |
|||
"She's dead of course" |
|||
). |
|||
#symbol program = |
|||
[ |
|||
0 till:(Creatures length) &doEach: i |
|||
[ |
|||
console |
|||
writeLine:"There was an old lady who swallowed a {0}" &args:(Creatures@i) |
|||
writeLine:(Comments@i). |
|||
((i != 0)&&(i != Creatures length - 1))? |
|||
[ |
|||
i till:0 &by:1 &doEach:j |
|||
[ |
|||
console writeLine:"She swallowed the {0} to catch the {1}" &args:(Creatures@j):(Creatures@(j - 1)). |
|||
]. |
|||
console writeLine:(Comments@0). |
|||
]. |
|||
console writeLine. |
|||
]. |
|||
]. |
|||
</lang> |
|||
=={{header|Factor}}== |
=={{header|Factor}}== |