June 2018
Intermediate to advanced
316 pages
6h 34m
English
It's good practice to write code using pure functions. The results of these functions depend on parameters. Using this approach, you can write simple, reliable, and predictable code that's easy to test. Pure functions don't use any shared states, which is why they're safe to use in a multithreaded environment. The functions in the kotlin.math package are good examples of pure functions:
val minResult = min(3, 4)val sqrtResult = sqrt(9.0)
Read now
Unlock full access