Would it be useful to have immutable versions of the writer and
changer tuple slot accessors? They would make a copy of the original
tuple with a single slot modified. It would make dealing with read-
only tuples a bit easier to deal with. I can't think of a great name
for them, but they would behave something like this:
TUPLE: immutable { la read-only } { li read-only } { lu read-only }
{ le read-only } { lo read-only } ;
M: immutable clone->>la ( foo la -- foo' )
swap { [ drop ] [ li>> ] [ lu>> ] [ le>> ] [ lo>> ] } cleave
immutable boa ;
M: immutable clone-change-la ( foo quot -- foo' )
[ dup la>> ] dip call clone->>la ; inline
-Joe
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk