implement less defaulty interface in cont.pl
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
|
||||
:- module(cont, [reset/3, shift/1]).
|
||||
|
||||
reset(Goal, Cont, Term) :-
|
||||
reset(Goal, Ball, Cont) :-
|
||||
call(Goal),
|
||||
'$reset_cont_marker',
|
||||
'$bind_from_register'(Cont, 3),
|
||||
'$bind_from_register'(Term, 4).
|
||||
'$bind_from_register'(Ball, 4).
|
||||
|
||||
shift(Term) :-
|
||||
'$nextEP'(first, E, P),
|
||||
get_chunks(E, P, L),
|
||||
Cont = cont(call_continuation(L)),
|
||||
( L == [] ->
|
||||
Cont = none
|
||||
; Cont = cont(call_continuation(L))
|
||||
),
|
||||
'$write_cont_and_term'(_, _, Cont, Term),
|
||||
'$unwind_environments'.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user