### list

#### To find maximum and minimum of a list in prolog

```domains
list = integer*//shows error in swish saying "syntax error operator
expected"
Max = integer
predicates
maximum_no(list,integer)
clauses
maximum_no([],Max):-
write("Maximum No in List is:: ",Max),nl.
maximum_no([H|T],Max):-
H>Max,
N = H,
maximum_no(T,N).
maximum_no(L,Max):-
maximum_no(L,Max).
Can someone please tell me how do I solve this error ? I do find the code is correct but it still says an error?
I also have to write the code to find the minimum number of a list!!
```
```The following alone works in order to find the max of a list :
% the maximum of a list of one element is this element
maximum_no([X],X).
% the maximum of a list is either the head or the maximum of the tail
% depending on if the head is lower than the max of the tail.
maximum_no([H|T],Max):-
maximum_no(T,Max),
H #< Max.
maximum_no([Max|T],Max):-
maximum_no(T,M),
M #< Max.
Then, finding the min of a list shouldn't be too complicated.```

Database Users
RDBMS discuss
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App