give it in shorthand syntax: `func lose(powerupactive: bool, touchingeagle: bool) -> bool { !powerupactive && touchingeagle }` in swift

In Swift, you can rewrite the given function using shorthand syntax by removing the explicit return type and the curly braces. Here's how it looks:

main.swift
func lose(powerupactive: Bool, touchingeagle: Bool) -> Bool {
    !powerupactive && touchingeagle
}
100 chars
4 lines

The shorthand syntax allows you to directly return the result of the expression without using the return keyword.

related categories

gistlibby LogSnag