Closureからある条件で抜けたい

Closureからreturnできない。


groovy:000> [1,2,3].each { println it; if (it >= 2) { return } }
1
2
3
===> [1, 2, 3]

戻すことができない。
まだ未サポート。


groovy:000> try { [1,2,3].each { println it ; if (it >= 2) { throw new RuntimeException() } }} catch (Exception ignore) {}
1
2
===> null

かっこ悪い。


groovy:000> [1,2,3].findAll { it <= 2 }.each { println it }
1
2
===> [1, 2]

状況で絞って処理に渡す。

でもreturnしたいこともおおいのでちょっとつらいな。

Vistaに移行中

  • ipmsg,bluewind,charu3,ChgKey,サクラエディタ,skype,w-zero3,tortoiseSVN,eclipse とかがとりあえず動いたので移行中
  • undonutが右クリックのカスタマイズができないのでundount+modに移行(問題ない感じ)
  • mute.exeは互換モードで動かせばOKだった。
  • UACをきらないと仕事にならない
  • Virtual Dimensionが動かず 動いた。
  • システムのハック系のユーティリティがうごかないものもあったが、まあなんとかなるだろう。