News for hackers. Stuff that matters.
Re:Learn OCaml – Exercises by lairv on Friday June 27, 2025 @09:30PM (#44401712)
In ocaml you would rather do something like this: let x_power_8 = (let a = x*x in let b = a*a in b*b);

a, b variables are just used for computing x_power_8, you don't need them outside of this scope. I think the point of the exercise is to use variable binding, though I agree the website doesn't explain much

There are no comments on this comment yet.