Why am I getting a “No signature of method”" error when running the closure recursion example in the Groovy shell?
问题 I'm trying to experiment with the Groovy closure recursion example from http://groovy.codehaus.org/JN2515-Closures . I saved the snippet in a file called recursionTest.groovy and loaded it in the shell, but I'm getting a "No signature of method error": // recursionTest.groovy def results = []; { a, b -> results << a a<10 && call(b, a+b) }(1,1) assert results == [1, 1, 2, 3, 5, 8, 13] groovy:000> load recursionTest.groovy ===> [] ERROR groovy.lang.MissingMethodException: No signature of method