jnrmember.blogg.se

Kotlin koans online
Kotlin koans online












There are many Kotlin books out there, however these 3 in particular are quite good especially if you’re an Android Developer.īetween KotlinConf, Google I/O, and a variety of Android conferences/meetups there are more and more videos out there that help teach Kotlin. And if that’s not enough, the Kotlin Blog and Medium are home to many more great posts. Kotlin Weekly consolidates many great articles about Kotlin every week. Kotlin for Android Documentation Blogs/Newsletters Once customers.sumBy returns, we have a count of the total number of times the specified product was ordered.The official documentation for Kotlin, and “Kotlin for Android” is a great place to start learning the language and how you can use it for Android development. The it.orders.sumBy returns a number that gets fed into customers.sumBy.

kotlin koans online

The it.unt returns a number that gets fed into it.orders.sumBy.

kotlin koans online

Once I was traversing orders, I could do a count operation on products and get a total of how many products matched my predicate. Inside of the lambda, I did another sumBy operation on orders. I needed two sumBy operations to solve this problem.

kotlin koans online

Get Customers Who Ordered Productįun Shop.getCustomersWhoOrderedProduct(product: Product): Set Ī customer has a one to many relationship with orders, and orders have a one to many relationship with products. While doing this, I got to revist the Elivis operator (?:), map, maxBy, sumBy, filter, count, and toSet. I had to solve three different problems using the collections API. This portion of the Kotlin Koans tutorial appeared to be a review of the concepts I had been working on throughout the collection section.














Kotlin koans online