Like - would still be nice if we had a more Groovy syntax for Stream.of(...)/.stream() ... G-)

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.



Reply via email to