gaurav12316
Programmer
I want to write a procedure max_nested_list/2 to find a maximum from a nested list.
For Example...
?- max_nested_list([], Z).
Z = []
?- max_nested_list([2, a], Z).
Z = 2 ;
No
?- max_nested_list([[1, a, f(b)], [[[5.2, a], 2], 4.3], [3, h(a)]], Z).
Z = 5.2 ;
No
For Example...
?- max_nested_list([], Z).
Z = []
?- max_nested_list([2, a], Z).
Z = 2 ;
No
?- max_nested_list([[1, a, f(b)], [[[5.2, a], 2], 4.3], [3, h(a)]], Z).
Z = 5.2 ;
No