Created
March 25, 2022 13:03
-
-
Save vikingosegundo/86f7ab0fc82c5e697d1f1b02a3db8964 to your computer and use it in GitHub Desktop.
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
struct Stack<T>: CustomStringConvertible { | |
init(_ s:_Stack<T>) { stack = s } | |
init( ) { self.init(createStack()) } | |
func push(_ el: T ) { stack.push(el) } | |
func pop ( ) -> T? { stack.pop() } | |
func peek( ) -> T? { stack.peek() } | |
var description: String { stack.string() } | |
private let stack: _Stack<T> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment