[mercury-users] string append
Peter Ross
peter.ross at miscrit.be
Wed Aug 2 00:21:53 AEST 2000
On Tue, Aug 01, 2000 at 11:20:40PM +1000, Michael Day wrote:
>
> Hi,
>
> is use of the + operator to append strings considered poor coding style?
> If not, could this (or any functional form, really) be added to string.m?
>
> :- func string + string = string.
>
> S0 + S1 = S :- append(S0, S1, S).
>
> (Does anyone like using ++ to append lists, or can we at least get a
> functional variation of append?)
>
There already is a functional version of append, it just doesn't show up
in the documentation for the module.
You can use it as an infix operator with the following notation
S = A `string__append` B
Pete
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list