genzou #7197(2008/08/18 11:41 GMT) [ Groovy ] Rating0/0=0.00
可変パラメータでも動くようにするには、どうしたらいいのでしょう?? 誰かご存知ですか?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
def func = { x, y -> (x..y).each{ Thread.sleep(50 + (int)(50*Math.random())) } } def profile = { function, x, y -> def start = java.util.Calendar.instance.timeInMillis function(x, y) println(java.util.Calendar.instance.timeInMillis - start) } def newFunc = profile.curry(func) newFunc( 200, 250 )
Rating0/0=0.00-0+
[ reply ]
genzou
#7197()
[
Groovy
]
Rating0/0=0.00
可変パラメータでも動くようにするには、どうしたらいいのでしょう?? 誰かご存知ですか?
def func = { x, y -> (x..y).each{ Thread.sleep(50 + (int)(50*Math.random())) } } def profile = { function, x, y -> def start = java.util.Calendar.instance.timeInMillis function(x, y) println(java.util.Calendar.instance.timeInMillis - start) } def newFunc = profile.curry(func) newFunc( 200, 250 )Rating0/0=0.00-0+
[ reply ]