summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-01 06:47:21 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-01 06:47:21 -0700
commit6e3ee573178e8860bb79f68153bfa7ed7ac949c7 (patch)
treee38006b4b8269ac947bf04be46a9c56b1ca2bf2b /txr.1
parent4f2f121684a68f0bd43c113d5b07436430692601 (diff)
downloadtxr-6e3ee573178e8860bb79f68153bfa7ed7ac949c7.tar.gz
txr-6e3ee573178e8860bb79f68153bfa7ed7ac949c7.tar.bz2
txr-6e3ee573178e8860bb79f68153bfa7ed7ac949c7.zip
New super-method function.
* struct.c (struct_init): Register super-method. (super_method): New function. * struct.h (super_method): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.131
1 files changed, 31 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 1596ab73..e2f631a4 100644
--- a/txr.1
+++ b/txr.1
@@ -18561,6 +18561,37 @@ Note: the
macro is an alternative interface which is suitable if
the slot name isn't a computed value.
+.coNP Function @ super-method
+.synb
+.mets (super-method < struct-obj << slot-name )
+.syne
+.desc
+The
+.code super-method
+function retrieves a function from a static
+slot belonging to the supertype of the structure type of
+.metn struct-obj .
+
+It then returns a function which binds
+that function's left argument to the structure.
+
+The
+.meta struct-obj
+argument must be a structure which has a supertype, and
+.meta slot-name
+must be a symbol denoting a static slot in that supertype.
+The slot must hold a function of at least one
+argument.
+
+The
+.code super-method
+function returns a function which, when invoked,
+calls the function previously retrieved from
+the supertype's static slot, passing to that function
+.meta struct-obj
+as the leftmost argument, followed by the function's
+own arguments.
+
.coNP Function @ slot-p
.synb
.mets (slot-p < type << name )