Length

Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return its length[!scala] (without using its size method, of course)[/!]. [!java|python]

[!python]Be careful, you are not supposed to use the Python lists, but the specific type defined in this exercise. [/!] Please refer to the world's documentation for more information about recursive lists.

[/!]

Your solution should be linear in time.