Adding back code removed due to merge conflict

pull/592/head
Morgan Pretty 2 years ago
parent d298bcdb4e
commit b6a6f77d4e

@ -1,11 +1,27 @@
import Foundation
public extension Array where Element : CustomStringConvertible {
public extension Array where Element: CustomStringConvertible {
var prettifiedDescription: String {
return "[ " + map { $0.description }.joined(separator: ", ") + " ]"
}
}
public extension Array {
func appending(_ other: Element) -> [Element] {
var updatedArray: [Element] = self
updatedArray.append(other)
return updatedArray
}
func appending(_ other: [Element]) -> [Element] {
var updatedArray: [Element] = self
updatedArray.append(contentsOf: other)
return updatedArray
}
}
public extension Array where Element: Hashable {
func asSet() -> Set<Element> {
return Set(self)

Loading…
Cancel
Save