#An attempt to show that even numbers are immutable in Elixir. The idea here is the makefun() function declares a new variable "a". Then creates a function. Then change the value stored with a. And finally returns the function. If a was truly a variable, then when execute the returned function #should print the changed value of a. If immutable, then the original value. #This is not a perfect test, but it is the best I can think of. # Author gtowell # Created Oct 2022 #As above, this makes the function and returns a closure. makefun = fn() -> a=5 ff = fn() -> IO.puts a end a=10 ff.() ff end main = fn() -> gg = makefun.() gg.() end main.()