Immutable values in F#
- by rsteckly
I'm just getting started in F# and have a basic question.
Here's the code:
let rec forLoop body times =
if times <= 0 then
()
else
body()
forLoop body (times -1)
I don't get the concept of how when you define a variable it is a value and immutable. Here, the value is changing in order to loop. How is that different from a variable in C#?