Created
June 27, 2019 18:47
-
-
Save voelzmo/57b9f35ce43ebf06f4ef68b25b89291f 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
package linkedlist | |
import "errors" | |
type Element struct { | |
Val interface{} | |
} | |
type List struct{} | |
var ErrEmptyList = errors.New("empty list") | |
func (e *Element) Next() *Element { | |
return &Element{} | |
} | |
func (e *Element) Prev() *Element { | |
return nil | |
} | |
func NewList(args ...interface{}) *List { | |
return &List{} | |
} | |
func (l *List) PushFront(v interface{}) { | |
} | |
func (l *List) PushBack(v interface{}) { | |
} | |
func (l *List) PopFront() (interface{}, error) { | |
return nil, nil | |
} | |
func (l *List) PopBack() (interface{}, error) { return nil, nil } | |
func (l *List) Reverse() *List { return nil } | |
func (l *List) First() *Element { return &Element{1} } | |
func (l *List) Last() *Element { return nil } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment