Open in app
Elye
6.3K Followers
About

Sign in

6.3K Followers
About
Open in app
You could turn the predicate into a lambda with receiver like this: public inline fun <T> T.takeIf(p
9
1

Fré Dumazy

Elye

Elye

Nov 28, 2017·1 min read

Nice one. The implementation I show here is from the standard.kt. You could propose to Kotlin to change their standard.kt.

Written by

Elye

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

More from Elye

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

More From Medium

When your Android Studio breakpoint doesn’t stop

Elye in Mobile App Development Publication

StaggeredVerticalGrid of Android Jetpack Compose

Elye in Mobile App Development Publication

Prefer Struct over Class in Swift

Elye in Mobile App Development Publication

Life beyond Android Application

Elye in Mobile App Development Publication

Controlling UIHostingController with SwiftUI View

Elye in Mobile App Development Publication

Use Swift Struct For Total Immutability

Elye in Mobile App Development Publication

Android Auto Library Initializer During Startup

Elye in Mobile App Development Publication

7 Gotchas When Explore Kotlin Coroutine

Elye in Mobile App Development Publication

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store