search::[MyState]->MyState
Closed this issue · 0 comments
Omar-Nour commented
The function takes as input a list of states. It checks if the head of the input list
is a goal state, if it is a goal, it returns the head. Otherwise, it gets the next states
from the state at head of the input list, and calls itself recursively with the result of
concatenating the tail of the input list with the resulting next states (take care that
the order of the concatenation here is important, the next states must be placed
by the end of the list)