Skip to Content
Kotlin in Action
book

Kotlin in Action

by Svetlana Isakova, Dmitry Jemerov
February 2017
Intermediate to advanced content levelIntermediate to advanced
360 pages
11h 55m
English
Manning Publications
Content preview from Kotlin in Action

Chapter 3. Defining and calling functions

This chapter covers

  • Functions for working with collections, strings, and regular expressions
  • Using named arguments, default parameter values, and the infix call syntax
  • Adapting Java libraries to Kotlin through extension functions and properties
  • Structuring code with top-level and local functions and properties

By now, you should be fairly comfortable with using Kotlin the same way you use Java. You’ve seen how the concepts familiar to you from Java translate to Kotlin, and how Kotlin often makes them more concise and readable.

In this chapter, you’ll see how Kotlin improves on one of the key elements of every program: declaring and calling functions. We’ll also look into the possibilities for ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kotlin in Action, Second Edition

Kotlin in Action, Second Edition

Roman Elizarov, Svetlana Isakova, Sebastian Aigner
Java to Kotlin

Java to Kotlin

Duncan McGregor, Nat Pryce
Head First Kotlin

Head First Kotlin

Dawn Griffiths, David Griffiths

Publisher Resources

ISBN: 9781617293290Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link