Created
July 10, 2018 12:47
-
-
Save TonPC64/2d64926dad35e01b4ff6f5623cb05d60 to your computer and use it in GitHub Desktop.
โจทย์ สร้าง stack ให้ push pop ได้
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
package main | |
type stack []int | |
func main() { | |
var value stack | |
value.push(5) | |
value.pop() | |
} | |
func (s stack) push(a int) stack { | |
return s | |
} | |
func (s stack) pop() (int, error) { | |
return 0, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment