Skip to content

Tuple constructors cannot be used as arguments to lambdas #2210

Answered by UWN
jasagredo asked this question in Q&A
Discussion options

You must be logged in to vote
?- call(\A-B^A^true, a-b, X).
   error(existence_error(procedure,(-)/4),(-)/4).
?- call(\ (A-B)^A^true, a-b, X).
   X = a.

not even in canonical form or wrapping the argument in parentheses

The cases you give are not canonical form. What you probably mean was functional notation just for \ alone. That would be

?- call(\( (A-B)^A^true ), a-b, X).
   X = a.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@jasagredo
Comment options

@UWN
Comment options

@jasagredo
Comment options

@UWN
Comment options

Answer selected by jasagredo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants