Old lady swallowed a fly: Difference between revisions
Content added Content deleted
(→{{header|jq}}: def cond(_;_)) |
|||
Line 2,300: | Line 2,300: | ||
def sing: |
def sing: |
||
def cond(q; x): select(q) | x; |
|||
⚫ | |||
range(0;8) |
|||
| "There was an old lady who swallowed a \(animals[$i]);", |
|||
| "There was an old lady who swallowed a \(animals[.]);", |
|||
( |
cond(. > 0; "\(phrases[.])"), |
||
cond(. < 7; |
|||
"", |
|||
cond(. > 0; |
|||
⚫ | |||
| " She swallowed the \(animals[$j]) to catch the \( |
|||
| " She swallowed the \(animals[$j]) to catch the \( |
|||
animals[$j - 1])\(if $j < 3 then ";" else "," end)", |
|||
cond($j == 2; " \(phrases[1])!") ), |
|||
else empty |
|||
⚫ | |||
end), |
|||
⚫ | |||
else empty |
|||
end) ; |
|||
sing |
sing |