Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

ticket #6863

 [1/4] from: lmecir::mbox::vol::cz at: 24-Jul-2001 5:50


Hi,
> This approach has one major problem. Your mut-equal? function has the > side effect that is may cause a re-allocation for the series because > it adds a value to it. >
You are right. This version tries to modify the series only in "special cases", while getting the correct result: indexz?: function [ series [series!] ] [orig-tail result] [ orig-tail: tail :series while [ error? try [result: (index? :series) - 1] ] [ if empty? head :series [ append :series #"1" ] append :series head :series ] clear :orig-tail result ] mut-equal?: func [ { a discernibility test, useful to discern SERIES! values } a [series!] b [series!] ] [ found? all [ same? tail :a tail :b equal? indexz? :a indexz? :b ] ] a: [1] insert a reduce [a] b: [1] insert b reduce [b] mut-equal? a a/1 ; == true mut-equal? b b/1 ; == true mut-equal? a b ; == false a: [1] b: tail a remove a mut-equal? b b ; == true Trying to use the SAME? function instead of the MUT-EQUAL? function reveals the bugs of SAME?. Regards Ladislav

 [2/4] from: rotenca:telvia:it at: 24-Jul-2001 12:38


----- Original Message ----- From: "Ladislav Mecir" <[lmecir--mbox--vol--cz]> To: <[rebol-list--rebol--com]>; <[feedback--rebol--net]> Sent: Tuesday, July 24, 2001 5:50 AM Subject: [REBOL] Re: ticket #6863
> Hi, > > This approach has one major problem. Your mut-equal? function has the
<<quoted lines omitted: 3>>
> Regards > Ladislav
I have not seen on the mailing list the message to which you answer. Was an email? --- Ciao Romano

 [3/4] from: lmecir:mbox:vol:cz at: 24-Jul-2001 14:12


----- Original Message ----- From: Romano Paolo Tenca <[rotenca--telvia--it]> To: <[rebol-list--rebol--com]> Sent: Tuesday, July 24, 2001 12:38 PM Subject: [REBOL] Re: ticket #6863
> I have not seen on the mailing list the message to which you answer. Was
an
> email? > > --- > Ciao > Romano >
It was an answer from feedback to the mail I sent both to feedback and to the list.

 [4/4] from: lmecir:mbox:vol:cz at: 24-Jul-2001 14:12


----- Original Message ----- From: Romano Paolo Tenca <[rotenca--telvia--it]> To: <[rebol-list--rebol--com]> Sent: Tuesday, July 24, 2001 12:38 PM Subject: [REBOL] Re: ticket #6863
> I have not seen on the mailing list the message to which you answer. Was
an
> email? > > --- > Ciao > Romano >
It was an answer from feedback to the mail I sent both to feedback and to the list.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted