Implements add first, add last

0 : next, init
1 : prev