[mercury-users] string append

Peter Schachte schachte at cs.mu.OZ.AU
Wed Aug 2 12:58:08 AEST 2000


On Wed, Aug 02, 2000 at 09:15:08AM +1000, David Overton wrote:
> As Rob and Ralph have mentioned, there is already a functional version
> of append (for both strings and lists).  You can use it as an infix
> operator by enclosing it in backquotes, e.g.:
> 
> 	S = S0 `append` S1 `append` S2

Out of curiosity, are `backquoted` operators left- or right-associative?  Ie,
if you care about efficiency, do you really have to write

	S = S0 `append` (S1 `append` S2)

or is that what you get anyway?

-- 
Peter Schachte <schachte at cs.mu.OZ.AU>  Abstraction is the only mental tool
http://www.cs.mu.oz.au/~schachte/      by means of which a very finite piece
Phone:  +61 3 8344 9166                of reasoning can covera myriad of
Fax:    +61 3 9348 1184                cases. -- Edsgar Dijkstra 
--------------------------------------------------------------------------
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