Menu

#12 Prolog list notation in 2apl external action

v1.0 (example)
open
None
5
2013-06-26
2013-06-26
No

When doing an external action in a 2APL program, it is not possible to use Prolog list notation in the returning argument directly, which might be convenient sometimes. For instance, in the harry and sally example, in person.2apl, we have the following code:

@blockworld( getSenseRange(), SR );
B(SR = [S]);
+senseRange(S);

It would of course be much easier if we could do this directly:

@blockworld( getSenseRange(), [S] );
+senseRange(S);

Discussion


Log in to post a comment.

MongoDB Logo MongoDB