depth/1 is an Erlang function exported by "age_lists" module. Calculates the number of nested lists within an input list. Take into consideration that this function accepts term of any type as follows: •when the input is a list then the depth level is equal or above 1. •when the input is not a list then the depth level is always 0. Be advised also, that string notation in Erlang is interpreted as a list term, so the depth is increased by one when you are nesting strings into list terms. |
|
|