fork download
  1. function len(list, count){
  2. count = count || 0;
  3. return list.next ? len(list.next, count + 1) : count + 1
  4. }
  5.  
  6. var list = {
  7. };
  8.  
  9. print(len(list))
Success #stdin #stdout 0.01s 30152KB
stdin
Standard input is empty
stdout
1