How's this? :)

>> e: [ 'e first (append ['g 'f] first second third e  remove second third e) ]
== ['e first (append ['g 'f] first second third e remove second third e)]
>> print e
e f
>> print e
e g
>> print e
e f
>> print e
e g

(I know i'm overlooking an even simpler way.  Hey, i'm a "constructionist"
hardware type!)

/Russ

---------------
At 08:38 AM 12/31/1999 -0600, you wrote:
>Well, it certainly qualifies, as it produces the results specified!  It
>also meets my "no function" criterion, as using an explicit state
>variable certainly isn't the same thing (IMHO) as using a function.
>
>It doesn't work the same way as my original solution, but that just
>makes it even more interesting, at least to me.  It's nice to see how
>many ways it could be done.
>
>I'll wait just a little bit longer before posting my version, to see
>we can come up with any more variations on this theme.
>
>HINT:  Try writing it without modifying another variable.
>
>-jn-
>
>[EMAIL PROTECTED] wrote:
>> 
>> Does this qualify?  Probably not what you were looking for (actually, just
>> building the "function" into the definition of 'e):
>> 
>> >> n: 0
>> == 0
>> >> e: [ 'e pick "fg" (n: (n + 1) // 2) + 1 ]
>> == ['e pick "fg" (n: (n + 1) // 2) + 1]
>> >> print e
>> e f
>> >> print e
>> e g
>> >> print e
>> e f
>> >> print e
>> e g
>>
>
>
>

Reply via email to