Level 1 · Apprentice0 XP
Add a function to a type you do not own, and choose between let, apply, also, run and with.
Step 1 / 5
ProblemYou cannot add a method to String, so helpers pile up in Utils classes. Calls read inside out: Utils.c(Utils.b(Utils.a(x))). Nobody discovers the helpers, because typing a dot after a string does not show them.
← → step
Before this: Collections
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Write three extensions: String.isValidEmail(), List<Int>.median(), and LocalDate.isWeekend. Then rewrite a block of code that creates an object and sets five properties so that it uses apply, and add a log line with also.