Created
March 12, 2018 23:37
-
-
Save kalub92/55a1931b3cb9e43ab58de2492cdd3ad1 to your computer and use it in GitHub Desktop.
This file contains 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
extension Stack: CustomStringConvertible { | |
var description: String { | |
let topDivider = "---Stack---\n" | |
let bottomDivider = "\n-----------\n" | |
let stackElements = array.joined(separator: "\n") | |
return topDivider + stackElements + bottomDivider | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment