summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2020-02-22 12:31:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2020-02-22 12:31:11 (GMT)
commit004c1e1c8e680a5b55b04bc747c5e8575538dd56 (patch)
tree5dfef57bf70872f09f185a944e2b057fc8b28bae /tools
parent99145db40b9162cb8ac82c74d08da7f8f74eb911 (diff)
downloadtcl-004c1e1c8e680a5b55b04bc747c5e8575538dd56.zip
tcl-004c1e1c8e680a5b55b04bc747c5e8575538dd56.tar.gz
tcl-004c1e1c8e680a5b55b04bc747c5e8575538dd56.tar.bz2
Less contorted code
Diffstat (limited to 'tools')
-rw-r--r--tools/tclOOScript.tcl11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/tclOOScript.tcl b/tools/tclOOScript.tcl
index 7355ad0..8167f83 100644
--- a/tools/tclOOScript.tcl
+++ b/tools/tclOOScript.tcl
@@ -311,12 +311,13 @@
method -appendifnew -export args {
set my [namespace which my]
set current [uplevel 1 [list $my Get]]
- set args [lmap a $args {
+ foreach a $args {
set a [uplevel 1 [list $my Resolve $a]]
- if {$a in $current} continue
- set a
- }]
- tailcall my Set [list {*}$current {*}$args]
+ if {$a ni $current} {
+ lappend current $a
+ }
+ }
+ tailcall my Set $current
}
method -clear -export {} {tailcall my Set {}}
method -prepend -export args {