Question: I've tried every permutation I can think of, and read all sorts of doc about Swift `#selectors`, but I'm not getting anywhere. Here's the code:

```
class AFSelectionState: GKComponent {
    let clearSelectionIndicator: (Set<Int>?) -> Void
    let setSelectionIndicator: (Set<Int>) -> Void

    init(setSelectionIndicator: @escaping (Set<Int>) -> Void, clearSelectionIndicator: @escaping (Set<Int>?) -> Void) {
        self.clearSelectionIndicator = clearSelectionIndicator
        self.setSelectionIndicator = setSelectionIndicator
    }
}

class GameScene: SKScene, SKViewDelegate {
    var selectionState: AFSelectionState!

    override func sceneDidLoad() {
        ...

/****************** Compiler errors coming up ****************
 **
 ** Tried #selector(setSelectionIndicator_(_:))
 ** Got "Cannot convert value of type 'Selector' to expected
 ** argument type '(Set<Int>) -> Void'"
 ** From what I've read, the above should be working, but you know
 ** how it is when people say "should".
 **
 ** Tried #selector(setSelectionIndicator_(_:) -> ())
 ** Got "Expected type before '->'".
 **
 ** Tried all sorts of other stuff. There's something about
 ** selectors that I'm missing.
 ** 
 *********************** Et cetera! *************************/

        selectionState = AFSelectionState(

            setSelectionIndicator: #selector(setSelectionIndicator_(_:)),
            clearSelectionIndicator: #selector(clearSelectionIndicator_(_:))

        )

        ...
    }
}

extension GameScene {
    @objc func setSelectionIndicator_(_ selectedIndexes: Set<Int>) -> Void {
        ...
    }

    @objc func clearSelectionIndicator_(_ indexes: Set<Int>?) -> Void {
        ...
    }
}

```

Answer: 
`Selector` is basically a string, not a closure, or block or whatever piece of code that could be executed. To achieve what you need try this:

```
selectionState = AFSelectionState(

    setSelectionIndicator: self.setSelectionIndicator_,
    clearSelectionIndicator: self.clearSelectionIndicator_

)

```

P.S. make sure you don't create reference cycle with this
This is the right syntax:

```
selectionState = AFSelectionState(setSelectionIndicator: setSelectionIndicator_, clearSelectionIndicator: clearSelectionIndicator_)

```

You mixed Selectors and Closures. Check out the link:

<https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html>