O'Reilly logo
  • MICHAEL MASLENKO thinks this is interesting:

One of many cases where this is useful is when you’re creating an instance of an object and need to initialize some properties right away. In Java, this is usually accomplished through a separate Builder object; and in Kotlin, you can use apply on any object without any special support from the library where the object is defined


Cover of Kotlin in Action


7 Builder implementation