Skip to content

Instantly share code, notes, and snippets.

@JefClaes
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save JefClaes/1f77003ed10ac92006d9 to your computer and use it in GitHub Desktop.

Select an option

Save JefClaes/1f77003ed10ac92006d9 to your computer and use it in GitHub Desktop.
Recursion in F# avoiding tail recursion
let rec recursiveFun i =
Console.WriteLine(i.ToString())
recursiveFun (i + 1)
Console.WriteLine("Make another call so the compiler doesn't detect tail recursion.")
recursiveFun 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment