How to get sequence depth
- Posted by lionel Feb 28, 2011
- 1348 views
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?