google-developer-training / kotlin-bootcamp

Report issues with the Kotlin Bootcamp for Programmers codelab
7 stars 2 forks source link

Kotlin Bootcamp issue: #45

Closed hidimpu closed 4 years ago

hidimpu commented 4 years ago

There is a small Error in the program while running the function

The Problem is in the " Kotlin Bootcamp for Programmers 3: Functions " Lesson 6 Step - 1 Where the provided code contains an error

The problem can be fixed by adding a "

I'm using the IntelliJ IDEA Community Edition 2020 1.1

The fixed code is stated as follows -

" fun main() { val decorations = listOf("rock", "pagoda", "plastic plant", "alligator", "flowerpot")

// eager, creates a new list
val eager = decorations.filter { it[0] == 'p' }
println("eager: $eager")

} "

codelab: kotlin-bootcamp