[Prev][Next][Index]

specification of destructive operation




Arnd,

Some of what you suggest is possible in LCL, except there is no way to
express sharing.  In particular,

> -  destroy list representations (e.g. conc destroys the representation
>       of its first argument (and introduces sharing of the result and
>       the second argument)

	Use trashed(l1) --- trashed says that after returning nothing
	can be assumed about l1.
	
> -  provide fresh representations (e.g. copy)

	Use fresh(result) --- fresh means its argument is not aliased to
	any objects in the pre-state.

To express sharing you would need to do something more complicated, as
Gary suggests.

--- Dave


Reference(s):