Runtime evaluation/In an environment: Difference between revisions

Content deleted Content added
trying to clarify some more...
revert Tcl: insofar as I understand the Tcl, the old version was closer to correct, and I understand the change was an attempt to comply with my task req changes
Line 175:
 
=={{header|Tcl}}==
 
{{incorrect|Tcl|The code provided should not itself be a function, but have x as a free variable.}}
 
<lang tcl>package require Tcl 8.5
 
proc evaliteval_twice {func a b} {
set r1st [apply $func $a]
exprset 2nd [apply $func {$r}b]
puts [ expr {$b2nd - $a1st}];
}
 
set a [evaliteval_twice {x {expr {2 ** $x}}} 3] 5 ;# ==> 24</lang>
set b [evalit {x {expr {2 ** $x}}} 5];
puts [expr {$b - $a}];
</lang>