// insert a node before a particular node of a list.
insert a node before a particular node of a list.
// insert a node before a particular node of a list .
func (l *list) insert(newn *node, v string) error {
	if l.head == nil {
		return errors.New("a target node is not exists")
	}
	for n := l.head; n.next != nil; n = n.next {
		if n.next.value == v {
			newn.next = n.next
			n.next = newn
			return nil
		}
	}
	return errors.New("a target node is not exists")
}
func ( l * list ) insert ( newn * node , v string ) error { if l . head == nil { return errors . New ( " " ) } for n := l . head ; n . next != nil ; n = n . next { if n . next . value == v { newn . next = n . next n . next = newn return nil } } return errors . New ( " " ) }
insert a node before a particular node of a list.
insert a node before a particular node of a list .
// sequential access