The main concept of pure functions is that they have no side-effects
(e.g. don't affect a global state or rely on I/O) and are analogous to a
mathematical function. The main things to draw from it are that for
constant inputs, the output is deterministic and can be calculated at
compile time (
I had a question about pure functions. I'm seeing some newer languages have a
JIT built-in so they can run any function at compile time. To get results at
compile time you probably need to use a constant for the parameters but in
theory it could read/write to global variables so it's not really