[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Length of a cons.



Guys,
	I have made an assumption that has reamed me.  Before I work
around it or try to figure out how to fix what I think is a bug, 
am I at fault?
	CMU CL does the following:

	* (cons 'x 'item)
	* (X . ITEM)
	* (length *)

	Type-error in LENGTH:  ITEM is not of type LIST

	Restarts:
  	0: [ABORT] Return to Top-Level.

	Debug  (type H for help)

	
	(LENGTH (X . ITEM))

Where as (cons 'a '(b c d)) returns the expected length of 4.  
As a check that I am not misreading what I think is appropriate
based on CLtL2 I tried out LUCID and get a length of 1 for (x .
item), which is what I expected. Note that (cons 'a '(b)) works
in both implementations.

					Paul