Actually, the java example is better, since the lambda is lazily evaluated. putIfAbsent will always try to construct it's second argument even if it isn't in the map. However, that doesn't mean you can't use it in kotlin as well.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Actually, the java example is better, since the lambda is lazily evaluated.
putIfAbsent
will always try to construct it's second argument even if it isn't in the map. However, that doesn't mean you can't use it in kotlin as well.