411 REFERENCE · Wikibooks
The Science of Programming/SwayPresentations/Objects/right
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
function right(items)
{
var slots = items . constructor . parameters;
var lhs = slots[0];
var rhs = slots[1];
if (type(items . (lhs)) == :OBJECT
&& items . constructor == items . (lhs) . constructor)
{
var x = items . (lhs);
items . (lhs) = x . (rhs);
x . (rhs) = items;
right(x);
}
else
{
items;
}
}