You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Array and Dictionary.values is missing forEach-method #11
I am not sure what the best approach would to implement this? Can I import SwiftBaseLibrary in my own projects (e.g. SharedProject) and then leverage it and make my own changes and then make pull requests for them?
The library is suggesting that it's available through Sequence:
public func forEach(@noescapebody:(T) throws ->()) rethrows {
but I am not getting it working when I do something like:
typealias LocationNode = TreeNode<Location>
var availableRootNodes = [TreeNode<Location>]()
// Code that populates the above array
for node in dictionary.Values {
availableRootNodes.append(node)
}
// Attempt to iterate through the list
availableRootNodes.forEach { (value) in
NSLog("Item has been discovered")
}
If I try to compile code like above I am getting the error:
E: No member "forEach " on type "Array<TreeNode<Location>!>" [/Users/weyertdeboer/Development/Projects/x/x/version-3/config-app/SharedProject/LocationService.swift (161)]
Activity