summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-02-03 14:23:17 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-02-03 14:23:17 -0800
commit755cb1b066a3b9035aba9933a881d356e75697d4 (patch)
treeb50cb520a76bab258e38bc27b9b8d60c6839148a /stdlib
parent72828632c47333d190e12dd6ceba0f2f0bf69ab5 (diff)
downloadtxr-755cb1b066a3b9035aba9933a881d356e75697d4.tar.gz
txr-755cb1b066a3b9035aba9933a881d356e75697d4.tar.bz2
txr-755cb1b066a3b9035aba9933a881d356e75697d4.zip
doc: fix in amb macro.
* txr.1: when the amb macro detects that the continuation has succeeded, it should return that successful value from the amb-scope, rather than returning the local successful argument a from the amb function. Although it works both ways, it is inefficient when it returns from the function. The reason is that each call to amb executes the successful future twice: once via (call cont a) and then again by returning the a value. This then causes an exponential cascade in calls: each successive amb call sthe successful future twice, so for instance if the solution has a sequence of 8 amb calls, the successful case is reached 256 times.
Diffstat (limited to 'stdlib')
0 files changed, 0 insertions, 0 deletions