[m-rev.] for review: Implemetation of string__append_list

Tyson Dowd trd at cs.mu.OZ.AU
Tue Sep 4 21:10:58 AEST 2001


On 04-Sep-2001, Yoann Dubreuil <ydu at miscrit.be> wrote:
> Excuse the attachment, but I am using MS outlook and I didn't want to lose
> the formating of the diff.
> 
> Thanks,
> Yoann
>
>
> Hi,
> 
> 
> ===================================================================
> 
> 
> Estimated hours taken: 0.25
> User: ydu
> Branches: main
> 
> library/string.m:
> 	Provide a Mercury implementation of string__append_list.
> 
> 
> Index: library/string.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/string.m,v
> retrieving revision 1.155
> diff -u -r1.155 string.m
> --- library/string.m	28 Aug 2001 12:48:50 -0000	1.155
> +++ library/string.m	4 Sep 2001 10:31:52 -0000
> @@ -1033,6 +1033,13 @@
>  }
>  ").
> 
> +string__append_list(Strs::in) = (Str::uo) :-
> +	( Strs = [X | Xs] ->
> +		Str = X ++ append_list(Xs)
> +	;
> +		Str = ""
> +	).
> +
>  :- pragma foreign_proc("C#",
>  		string__join_list(_Sep::in, _Strs::in) = (_Str::uo),
> 		[will_not_call_mercury, thread_safe], "{

A quick comment saying that the Mercury might be a bit slower than the custom
implementations might be nice.

Et bravo pour votre premier diff!

Tyson.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list