aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/op.spad.pamphlet6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/algebra/op.spad.pamphlet b/src/algebra/op.spad.pamphlet
index b5d9da45..617ea416 100644
--- a/src/algebra/op.spad.pamphlet
+++ b/src/algebra/op.spad.pamphlet
@@ -91,6 +91,9 @@ BasicOperator(): Exports == Implementation where
assert : ($, String) -> $
++ assert(op, s) attaches property s to op.
++ Argument op is modified "in place", i.e. no copy is made.
+ assert : (%, Identifier) -> $
+ ++ \spad{assert(op, p)} attaches property \spad{p} to \spad{op}.
+ ++ Argument op is modified "in place", i.e. no copy is made.
deleteProperty_!: ($, String) -> $
++ deleteProperty!(op, s) unattaches property s from op.
++ Argument op is modified "in place", i.e. no copy is made.
@@ -135,7 +138,8 @@ BasicOperator(): Exports == Implementation where
case search(STRING(p)$Lisp, rep(op).props) is
val@None => just val
otherwise => nothing
- assert(op, s) == setProperty(op, s, NIL$Lisp)
+ assert(op: %, s: String) == setProperty(op, s, NIL$Lisp)
+ assert(op: %, p: Identifier) == setProperty(op, p, NIL$Lisp)
has?(op, name) == key?(name, rep(op).props)
weight(op, n) == setProperty(op, WEIGHT, n pretend None)
nullary? op == zero? rep(op).narg