# `getLastValue` looks a bit weird # This worked for me proc getLastValue[T](n: node[T]): T = var current = new node[T] current[] = n while current.next != nil: current = current.next return current.value