I am implementing a recursive function and I want the stopping condition be (2*scope) which is parameter to function
sortByManhattanDistance agent (2*scope) scope xs sortedNearFoodList = sortedNearFoodList
sortByManhattanDistance agent n scope xs sortedNearFoodList = sortByManhattanDistance agent (n+1) scope xs (sorted ++ sortedNearFoodList)
where sorted=compareManhattanDistance xs agent n
and hugs complain that: Syntax error in declaration (unexpected symbol "*")
Does it mean that I cannot use some function on parameters?
thanks in advance
(2*scope)as a input argument value. That is not a valid syntax