what would you say is a good example usage of `.le...
# announcements
l
what would you say is a good example usage of
.let {}
on a non-nullable instance?
n
if I have a long method chain (3+ lines) and I don't want to wrap the entire thing in a constructor call, I'll do that.
foo.bar().baz().cat().let { Thing(it) }
instead of
Thing(foo.bar().baz().cat())
👍 5
l
great point
s
Yup.
.let
on a plain object is similar to a
.map
on a Collection/List (in both nullable and non-nullable situations)
👍 2