what's the correct way for a lambda to be returnin...
# getting-started
j
what's the correct way for a lambda to be returning void? for example I have written this function
fun createImage(sizeX: Int, sizeY: Int, logic: (g: Graphics) -> Void) : BufferedImage
and IDEA is moaning that my lambda usage is returning
Unit
and not Void how do I say that the
logic
parameter can be a function that returns null and how can I write the lambda to not return anything
Copy code
myClass.createImage(64, 64)
{
    // invoking simple drawing functions using graphics but don't need to return anything
}