daily pastebin goal
18%
SHARE
TWEET

[Go][excerpt] List class

cwchen Nov 21st, 2017 136 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Excerpt
  2. // List holds the internal structure of a doubly-linked list
  3. type List struct {
  4.     head *node
  5.     tail *node
  6. }
  7.  
  8. // Internal struct as a node
  9. type node struct {
  10.     data interface{}
  11.     next *node
  12.     prev *node
  13. }
RAW Paste Data
Top