func NewList(length int, element interface{}) (result *Pair) {
	if length < 0 {
		panic(negativeLength(length))
	}
	for i := 0; i < length; i++ {
		result = &Pair{Car: element, Cdr: result}
	}
	return
}
NewList returns a list of the given length, whose elements are all the value element.
package list
import (
	"bytes"
	"fmt"
)
type Pair struct {
	Car, Cdr interface{}
}
func Nil() *Pair {
	return nil
}
func (list *Pair) String() string {
	if list == nil {
		return "()"
	}
	var buf bytes.Buffer
	fmt.Fprint(&buf, "(", list.Car)
	for {
		nextPair, ok := list.Cdr.(*Pair)
		if !ok {
			fmt.Fprint(&buf, " . ", list.Cdr)
			break
		}
		if nextPair == nil {
			break
		}
		fmt.Fprint(&buf, " ", nextPair.Car)
		list = nextPair
	}
	fmt.Fprint(&buf, ")")
	return buf.String()
}
func NewPair(car, cdr interface{}) *Pair {
	return &Pair{Car: car, Cdr: cdr}
}
func list(elements ...interface{}) (result *Pair, last *Pair) {
	if len(elements) == 0 {
		return
	}
	result = &Pair{Car: elements[0]}
	last = result
	for _, e := range elements[1:] {
		last = last.ncdr(e)
	}
	last.Cdr = (*Pair)(nil)
	return
}
func List(elements ...interface{}) (result *Pair) {
	result, _ = list(elements...)
	return
}
func Cons(element1, element2 interface{}, moreElements ...interface{}) (result *Pair) {
	if len(moreElements) == 0 {
		return &Pair{Car: element1, Cdr: element2}
	}
	last := &Pair{Car: element2}
	result = &Pair{Car: element1, Cdr: last}
	sz := len(moreElements) - 1
	for i := 0; i < sz; i++ {
		last = last.ncdr(moreElements[i])
	}
	last.Cdr = moreElements[len(moreElements)-1]
	return
}