Salve a tutti, ho un prolema nel passare una closure come argomento di una funzione


codice:
func funzioneStandard( numero: Int, msg: String, onEndFunc: (variabile: AnyObject) -> Bool ) -> Void{
   let key : Int
   if( msg == "messaggio" ){
      key = numero * 5 / 2
   }
   else{
      key = numero +1
   }


   msg += "_END"
   let isLunghezzaPari = onEndFunc( variabile: msg )
}




funzioneStandard(4, "test", {(variabile : AnyObject) -> Bool in
   return count(variabile) % 2
})