i to p

infix to postfixにはRubyの特徴を活かした名回答があって,Ioでも同じアプローチが使える。

  • i-to-p.io (115)
forward=setSlot("-",method(A,call message name print;self))
File standardInput readLines map(V,doString(V)"
"print)

…はずが,またしてもあなごるで通らない。

Io> message(a*b*(c+d)+e) code

の結果は手元の(Io 20080107)では

==> a *(b) *((c +(d))) +(e)

だが,あなごるのバージョン(Io 20061005)だと

==> a *(b *(c +(d))) +(e)

になる。プリプロセッサのバグかな。



親愛なるid:shinichiro_h様。
そろそろ各言語の一斉更新など如何でしょう。( ' ')
アレでしたら js/st/io だけでも結構です(何)。