Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 145 Bytes

File metadata and controls

13 lines (8 loc) · 145 Bytes

Q. Length of the list

Code

len([],L):-write(L).

len([_|T],L):- L1 is L + 1, len(T,L1).

Query

len([5,2,9,5],L).