Hi,

I'm having trouble understanding the behavior below:

Running the code below on the listener:

TUPLE: test a b c ;
: <test> ( -- t ) { 1 2 } { 3 4 } { 5 6 } test boa ;
: f1 ( -- ) <test> . ;
: f2 ( -- ) <test> a>> [ [ 10 0 ] dip set-nth ] [ [ 20 1 ] dip set-nth ] bi ;

f1 
! outputs T{ test { a { 1 2 } } { b { 3 4 } } { c { 5 6 } } }

f2 f1 
! outputs T{ test { a { 10 20 } } { b { 3 4 } } { c { 5 6 } } }

Why is the mutation on a separate tuple instance impacting another?
Am I doing something incorrectly? 


Thanks,
Sankar


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to