this post was submitted on 29 Aug 2023
10 points (85.7% liked)

General Programming Discussion

7806 readers
6 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS
 

I am beginner who thought before doing the String Methods section of the course "You know what, let's test my skills". And boy my skills were tested. After I completed the challenge my jaw dropped, with the solution.

Had/Have this happened to y'all. Where you make something complicated and found out that there was a simple solution?

Solution

My Code

you are viewing a single comment's thread
view the rest of the comments
[–] boonhet@lemm.ee 1 points 1 year ago

I look up the exact behavior of some basic Kotlin collection lambdas all the time. Does filter return elements with true or false lambda return value? I'll just Google it instead of relying on my memory.