make length= functions compatible with sequences