Is there anyway to test my extension methods on the playground

I tested a sample from Apple's developer blog, but I noticed that Playground doesn't seem to see the extension. Is it still possible?

func valuesForKeys2(keys: [Key]) -> [Value?] {
    //this iterates throw each key and executes a function
    //on the class for each value
    return keys.map { self[$0]}
}

      

+3


source to share





All Articles