Reorder the lines in the function that toggles an AtomicBoolean.
Atomic variables with AtomicFU
Reorder the lines
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
flag.value = !current
val flag = atomic(true)
}
val current = flag.value
fun toggle() {
return flag.value
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.