I want to define a closure which takes one argument (which i refer to with it )
sometimes i want to pass another additional argument to the closure.
how can i do this?
I want to define a closure which takes one argument (which i refer to
Share
You could set the second argument to a default value (such as null):
Another option would be to make
ba vararg List like so: