1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
link loadfuncpp record thing(val, method) procedure method(x) object := self() | stop("not bound to a record") object.val := x end procedure main() obj := thing() obj.method := bindself(method, obj) write(image(obj.method)) obj.method(99) write( obj.val ) end