public static <A> LinkedList<A> toLinkedList(
			List<A> list) {
		if (list == null) {
			return null;
		}
		if (list instanceof LinkedList) {
			return (LinkedList<A>) list;
		} else {
			return new LinkedList<A>(list);
		}
	}