diff options
author | dos-reis <gdr@axiomatics.org> | 2009-05-15 15:14:07 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-05-15 15:14:07 +0000 |
commit | d9fed70309979e063c16c35be9756c4ce76b2136 (patch) | |
tree | 20fa996f487c63fd94dc60263caef4e9dda48c9b /src/algebra | |
parent | b577f3615e65146f1efaa37d18ff3abfbe215695 (diff) | |
download | open-axiom-d9fed70309979e063c16c35be9756c4ce76b2136.tar.gz |
* algebra/op.spad.pamphlet (assert$BasicOperator): Overload for
Identifier.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/op.spad.pamphlet | 6 |
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 |