How to get sequence depth

new topic     » topic index » view thread      » older message » newer message

How do you find the depth of a nested sequence? Something like:

depth({}) = 1 
depth({{}}) = 2 
depth({{{}}}) = 3 

and so on. A recursive function, ostensibly. Can anyone write depth() here?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu