Write a function that uses recursion to count to ten.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|%Assignment: Write a function that uses recursion to count to ten.|
|to_ten() -> count(0).|
|% Base case|
|count(10) -> 10;|
|%keep on adding 1 untill you reach the above function|
|count(Value) -> count(Value + 1).|