Add a text parameter in your lambda parameter like this: fun text(text: String, do: (String) -> Unit)
Then in your function body, pass in text like this: do(text)
Then whenever you call the text function, you have access to the text parameter in the lambda body (i.e. by referring to it as it or naming it directly like this: text("1") { input -> ***}