Categories
ios objective-c-blocks swift

How to declare a block with arguments in swift?

Having a hard time figuring out how to properly declare/use blocks with swift.
What would be the swift equivalent of the following code?

Thanks.

^(PFUser *user, NSError *error) {
if (!user) {
NSLog(@"Uh oh. The user cancelled the Facebook login.");
} else if (user.isNew) {
NSLog(@"User signed up and logged in through Facebook!");
} else {
NSLog(@"User logged in through Facebook!");
}