function len(list, count){
count = count || 0;
return list.next ? len(list.next, count + 1) : count + 1
}
var list = {
};
print(len(list))
ZnVuY3Rpb24gbGVuKGxpc3QsIGNvdW50KXsKICAgIGNvdW50ID0gY291bnQgfHwgMDsKICAgIHJldHVybiBsaXN0Lm5leHQgPyBsZW4obGlzdC5uZXh0LCBjb3VudCArIDEpIDogY291bnQgKyAxCn0KCnZhciBsaXN0ID0gewp9OwoKcHJpbnQobGVuKGxpc3QpKQ==