== corps purs
set s [expr {$s + $x*$x}]
pure {s = ($s + $x*$x)} carried s temps {} folds s conditional {} collects {} integers {}
(s = $s + $x*$x)
pure {(s = $s + $x*$x)} carried s temps {} folds s conditional {} collects {} integers {}
expr {s = $s + $x*$x; m = max($m, $x)}
pure {(s = $s + $x*$x; m = max($m, $x))} carried {s m} temps {} folds s conditional {} collects {} integers {}
set d [expr {$x - 1}]; set s [expr {$s + $d*$d}]
pure {d = ($x - 1); s = ($s + $d*$d)} carried s temps d folds s conditional {} collects {} integers {}
incr n; incr t $x
pure {n = vecIncr($n, 1); t = vecIncr($t, $x)} carried {n t} temps {} folds {} conditional {} collects {} integers {n t}
if {$x > 0} {incr p} elseif {$x < 0} {incr n} else {incr z}
pure {($x > 0) ? (p = vecIncr($p, 1)) : (($x < 0) ? (n = vecIncr($n, 1)) : (z = vecIncr($z, 1)))} carried {p n z} temps {} folds {} conditional {p n z} collects {} integers {p n z}
if {$x > 0} then {set s [expr {$s + $x}]}
pure {($x > 0) ? (s = ($s + $x)) : 0} carried s temps {} folds {} conditional s collects {} integers {}
lappend L [expr {$x * 2}]
pure {($x * 2)} carried {} temps {} folds {} conditional {} collects L integers {}
set y $x; set s [expr {$s + $y}]
pure {y = $x; s = ($s + $y)} carried s temps y folds s conditional {} collects {} integers {}
set c 0
pure {c = 0} carried {} temps c folds {} conditional {} collects {} integers {}
== corps impurs
puts $x impure {a command without a profile} puts
set s [expr $s + $x] impure {set: a value that is not [expr {...}], $v or a number} set
set s [string length $x] impure {set: a value that is not [expr {...}], $v or a number} set
set s [expr {$s + $x}]; continue impure {a command without a profile} continue
set a(1) $x impure {set: a name that is not a simple scalar} set
lappend L $x; set s [expr {$s + [llength $L]}] impure {a command substitution [...]} {}
lappend L $x; set L 0 impure {a collected list also used as a number} {}
$cmd $x impure {a command name that is computed} {}
if {$x} {puts a} impure {a command without a profile} puts
set s [expr {$s + $x}] ; foreach y $Y {incr s} impure {a command without a profile} foreach
== une commande redéfinie n'a plus de profil
incr redéfinie : 0 a command without a profile incr
incr d'origine : pure {n = vecIncr($n, 1)} carried n temps {} folds {} conditional {} collects {} integers n
== tout corps que la boucle compile aujourd'hui est pur
7 purs, écarts :