>:- pred io__write_list(io__output_stream, list(T), string,
> 	pred(T, io__state, io__state), io__state, io__state).
>:- mode io__write_list(in, in, in, pred(in, di, uo) is det, di, 
>uo)
> 	is det.
>:- mode io__write_list(in, in, in, pred(in, di, uo) is cc_multi, 
>di, uo)
> 	is cc_multi.
> 	% io__write_list(Stream, List, Separator, OutputPred, IO0, 
>IO)
> 	% applies OutputPred to each element of List, printing 
>Separator
> 	% between each element. Outputs to Stream.
>
> From the pred and mode declaration you should, by now, be able 
>to deduce
>that "OutputPred" is supposed to be a "pred(T, io__state, 
>io__state)",
>with modes "pred(in, di, uo)"...

In my original question, what I meant was, What is passed to 
OutputPred??
All the arguments have modes with in and none for out. OutputPred 
has mode for in, di and uo. So, what exaclty has to be supplied to 
OutputPred so that it applies to each element of the List, 
printing Separator between each element???

Why is it that the argument has the alphabet T mentioned in such 
cases and not any other alphabet for arguments such A, B .

Thanks and Regards

Noel
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users@cs.mu.oz.au
administrative address: owner-mercury-users@cs.mu.oz.au
unsubscribe: Address: mercury-users-request@cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request@cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------

