[REBOL] Re: Curious 'rejoin behavior
From: brian:hawley at: 30-May-2001 17:55
Scott Jones wrote:
>I was working through some xml to rebol conversions, and I noticed what
>seems to be curious behavior on the part of 'rejoin. I suspect that
>this is a bug, but maybe I have misunderstood the behavior of this word.
>rejoin [ <bid> price </bid> ] ; returns: <bid2</bid>>
>; shouldn't it be: <bid>2</bid>
>Bug or have I misunderstood some fundamental property of 'rejoin?
Join and rejoin append the latter arguments to a copy of
the first argument, and if the first argument is a string
type (like tag!) the result will have the same type. You
might want to change your code to this, for example:
rejoin ["" <bid> price </bid>] ; returns "<bid>2</bid>"
; or perhaps this
rejoin ["<bid>" price </bid>] ; returns "<bid>2</bid>"
This will have the desired result, I think