I have a question about using a local function in a global function.
I tried to write the function which appears in the picture, but an error said
unbound value of f
It's strange that this error occurs. It should not appear because I defined the definition of the function enf
in affichage
.
Here is a picture of a relevant part of my code:
What can be the reason of this error?
enf
is not defined whenaffichage
is defined, so since the body ofaffichage
refers toenf
, this results in an unbound value error. In order to have mutually recursive functions, you'll need something of the form