. "g is a function that given a list of Direction would return weather of not the ant got back to its place." . . .