-1

What is the meaning of this command in Prolog's commanf line? What does time and what does time(ids)? ?- time(ids)

user70721
  • 13
  • 3
  • "Please explain this code" questions are typically off-topic here by reason of being too broad. This one is narrower in terms of the _amount_ of code provided being tiny, but doesn't provide enough context to be answerable without outside resources, which is itself grounds to be considered off-topic. – Charles Duffy Dec 15 '22 at 15:58

1 Answers1

0

Prolog lists are singly linked lists and it's more convenient and more performant to prepend things on the front instead of append them on the end. A common technique is to build a list backwards, then reverse it. Slago is doing that.

The search starts with the Start state in the list, prepends intermediate states, and finishes when goal(State) holds and the state at the front of the list is the solved puzzle.

Context: https://stackoverflow.com/a/67645940/

TessellatingHeckler
  • 27,511
  • 4
  • 48
  • 87