Re: Discuss changing the behaviour of append()

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

In my current code, I ran across this case and had to code an explicit test to get around it. This is 'ugly' and makes the code a bit slower and larger.

function F(object A, object B) 
sequence x 
    if atom(A) then 
        x = append({A}, B) 
    else 
        x = append(A, B) 
    end if 
    return x 
end function 

Derek, this case shows that there was some wrong logic in your "current code". So, your code was 'ugly', not your new function F() which corrected your mistake.

And that your subtle logic bug was fixed thanks to old good append() feature.

Or, maybe, you just forgot how append() works? smile


Regards


kinz

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu