[Prev][Next][Index][Thread]

Re: A Proposal!!



On Mon, 22 May 2000 10:10:59 +0100, Jason Trenouth <jason@harlequin.co.uk>
wrote:


> define method add-last! ( l :: <list>!, e :: <object> ) => ( l :: <list>! )
>   tail( %last( l ) ) := pair( e, #() );
>   l
> end method;

Ooops. That should have been more like:

define method add-last! ( l :: <list>!, e :: <object> ) => ( l :: <list>! )
  let new = pair( e, #() );
  tail( %last( l ) ) := new;
  %last( l ) := new;
  l
end method;

__Jason

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp


References: