Dinesman's multiple-dwelling problem: Difference between revisions
→{{header|Quackery}}: improved
m (→{{header|Quackery}}: tweaked text, removed superfluous code) |
(→{{header|Quackery}}: improved) |
||
Line 3,911:
fletcher cooper adjacent exclude</pre>
::* Baker does not live on the top floor.
Line 3,923:
<code>permutations</code> is defined at [[Permutations#Quackery]].
<syntaxhighlight lang="Quackery"> [
[ temp share 0 peek ] is baker ( --> n )
[ temp share 1 peek ] is cooper ( --> n )
[ temp share 2 peek ] is fletcher ( --> n )
Line 3,938 ⟶ 3,940:
[ temp share nested join ] is include ( [ --> [ )
[]▼
problem put
' [ 1 2 3 4 5 ] permutations▼
▲ []
witheach▼
' [
[ baker top exclude▼
▲ witheach
cooper bottom exclude▼
[ temp
smith fletcher adjacent exclude▼
say " B
▲ include ]
▲ temp release ]
solve
▲ witheach [ echo cr ]</syntaxhighlight>
fletcher top
fletcher bottom or exclude
miller cooper higher require
fletcher cooper adjacent exclude ]</syntaxhighlight>
{{out}}
|