Anonymous user
Amb: Difference between revisions
m
→version 1: split a one-line DO loop into two statements.
m (→version 1: split a one-line DO loop into two statements.) |
|||
Line 2,957:
An assumption was made that equivalent lowercase and uppercase (Latin) letters are considered a match.
<lang rexx>/*REXX program demonstrates the Amd operator, choosing a word from each set. */
@.=; @.1 = "the that a"
@.2 = "frog elephant thing"
@.3 = "walked treaded grows"
@.4 = "slowly quickly"
call Amb 1 /*find all word combinations that works*/
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
Amb: procedure expose @.; parse arg # x; arg . u
do j=1 until @.j==''
if #>t then do; y=word(u, 1)
say space(x) /*¬show superfluous blanks.*/
end
end /*k*/
return
{{out|output|text= when using the default internal input:}}
<pre>
|