< The Science of Programming < SwayPresentations < Objects
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; } }
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.