``` val index = input.indexOf(keyword).takeIf { it...
# random
c
Copy code
val index = input.indexOf(keyword).takeIf { it >= 0 } ?: error("keyword not found")
This is yummy. I can’t count the number of times where
indexOf
code has bothered me.