Index of a specific element in a multidimensional list using Prolog
I'm trying to figure out if there is a way to find a specific index of an element in a multidimensional list, for example [[1,2,3],[4,5,6],[7,8,9]]
?
How do I find the index '5' - [2] [2] or get the value [3] [3]? Is this possible if the size of the list is unknown? Or is there a built-in predicate?
+3
source to share
1 answer