{}
62
%OFF

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
62
%OFF

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
run-icon
main.swift
enum Bar { case a case b } func foo(bar: Bar, action: () -> Void) -> Bar { action() return bar } var actionBar: Bar! let resultBar = foo(bar: Bar.b) { actionBar = resultBar print("Assigned") } print(actionBar == resultBar) // 👈 false print(actionBar) // 👈 Optional(DemoProject.Bar.a)
Output