Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#trace : recursive calls not displayed #178

Open
waillep opened this issue Jan 11, 2021 · 0 comments
Open

#trace : recursive calls not displayed #178

waillep opened this issue Jan 11, 2021 · 0 comments

Comments

@waillep
Copy link

waillep commented Jan 11, 2021

#trace on recursive function should display recursive calls.

let rec somme (x:int) : int = if x>0 then x + (somme (x-1) else x ;;
#trace somme
(somme 4) ;;

Should display
somme <-- 4
somme <-- 3
somme <-- 2
somme <-- 1
somme <-- 0
somme --> 0
somme --> 1
somme --> 3
somme --> 6
somme --> 10

  • : int = 10

But only displays
somme is now traced

  • : int = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant