On 28/07/2020 12:30, Jochen Theodorou wrote:
well, with the streams API:return Stream.of(null,Character.TYPE,Integer.TYPE). map {doChooseMethod(methodName, adjustArguments(arguments, it)}. findFirst {it}. orElseThrow {new GroovyRuntimeException("$methodName not found")}The key here being that map is not executed eager.