Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wrapper(L,Args):-
- catch(one_more_wrap(L,Args),_,send(L,false)).
- one_more_wrap(L,Args):-
- real_predicate(Args,Result),
- send(L,[true,result]).
- % of course you can avoid the second wrap if you add the send to the real predicate:
- % real predicate = foo
- foo(L,X,Result):-
- X>0,
- Result=42,
- send(L, [true,42]).
Add Comment
Please, Sign In to add comment