Created
February 28, 2018 08:52
-
-
Save mwrites/a01eff9bb5bcc9ea3587cd2915fb8707 to your computer and use it in GitHub Desktop.
CustomCollection Description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Queue<T> : CustomStringConvertible where T : CustomStringConvertible { | |
fileprivate var array = [T]() | |
public var description: String { | |
var desc: String = "" | |
desc = array.reduce(into: desc) { | |
$0 += $1.description + "\n" | |
} | |
return desc | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment