prolog: print list with sequence numbers of elements
prolog: print list with sequence numbers of elements
(OP)
I am new to prolog, and I am trying to print a list of elements along with their indexes(sequence numbers).
The input: printlist([a,b,c]).
output: 1 a
2 b
3 c
Yes
If you could help, it would be greatly appreciated.
Thanks.
Daniel Passwater
The input: printlist([a,b,c]).
output: 1 a
2 b
3 c
Yes
If you could help, it would be greatly appreciated.
Thanks.
Daniel Passwater




