You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:- use_module(library(cont)).a:-write(a_enter),nl,
reset(b, a_returned, _),
write(a_end),nl.b:-write(b_enter),nl,
reset(c, b_returned, _),
write(b_end), nl.c:-write(c_enter), nl,
shift(a_returned), %% SHOULD this return to a?
shift(b_returned),
write(c_end), nl.
?- a.
%@ a_enter%@ b_enter%@ c_enter%@ false.
I'm curious if we think this should be the desired behavior or not for shift/reset. It probably makes sense but it does not allow for targeting reset points by using the second argument, as @triska mentioned here. It means there is effectively a 1:1 relationship with a shift and a reset.
The semantics of unifying against an arbitrary reset might be madness, but also it would be quite powerful. (I'm not sure Djikstra would agree).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm curious if we think this should be the desired behavior or not for shift/reset. It probably makes sense but it does not allow for targeting reset points by using the second argument, as @triska mentioned here. It means there is effectively a 1:1 relationship with a shift and a reset.
The semantics of unifying against an arbitrary
reset
might be madness, but also it would be quite powerful. (I'm not sure Djikstra would agree).Beta Was this translation helpful? Give feedback.
All reactions