fork download
  1. # Tcl 8.5 has no lmap, so we use foreach instead.
  2. interp alias {} lmap {} foreach
  3.  
  4.  
  5. lmap o\ b [lassign [gets stdin] a] {set a [expr $a$o$b]};puts $a
Success #stdin #stdout 0.03s 5272KB
stdin
-2 + 6 / 2 * 8 - 1 / 2.5 - 18
stdout
-12.0