Skip to content

Higher order goals? #183

Answered by pmoura
EllenOrange asked this question in Q&A
Aug 10, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

P.S. I was thinking about a solution using parametric objects and parametric objects proxies. See the proxies example.

But going back to your code, the usual solution is to define a marker protocol that your rooms will implement and then call implements_protocol(Room, room_protocol) in your connected_to/1 predicate to enumerate rooms and thus avoid that instantiation error.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@EllenOrange
Comment options

@pmoura
Comment options

Answer selected by EllenOrange
@EllenOrange
Comment options

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