Anonymous user
Dinesman's multiple-dwelling problem: Difference between revisions
Dinesman's multiple-dwelling problem (view source)
Revision as of 01:55, 27 June 2011
, 13 years ago→{{header|Icon}} and {{header|Unicon}}: remove []
m (→Using the Amb operator: Modify headings) |
m (→{{header|Icon}} and {{header|Unicon}}: remove []) |
||
Line 148:
This solution uses string invocation to call operators and the fact the Icon/Unicon procedures are first class values. The procedure names could also be given as strings and it would be fairly simple to read the names and all the rules directly from a file. Each name and rule recurses and relies on the inherent backtracking in the language to achieve the goal.
The rules explicitly call stop() after showing the solution. Removing the ''
<lang Icon>invocable all
|