Skip to content

Instantly share code, notes, and snippets.

Avatar

Matej Malesevic mmalesevic

  • Approppo
  • Bern, Switzerland
View GitHub Profile
View SimpleGame.swift
import Foundation
enum AttackError: Error {
case opponentsLiveToLow
case ownResourcesToLow
case causingNoDamage
case immortal
}
func print(verbose: Bool, _ items: Any) {
View api_closure_sample.swift
class Api {
func getRemoteMessages(_ completion: @escaping(Data?, URLResponse?, Error?) -> Void) {
DispatchQueue.main.asyncAfter(deadline: .now()+3) {
completion(nil,nil,nil)
}
}
}
func getMessages(completionHandler: @escaping (Data?, Error?) -> Void) {
View keybase.md

Keybase proof

I hereby claim:

  • I am mmalesevic on github.
  • I am malesevic (https://keybase.io/malesevic) on keybase.
  • I have a public key ASB9rDOZfUefnTVNlp5dRJZUX-g4xAH9z_WN94RzoH9dqAo

To claim this, I am signing this object: