Basicly I want to write pure functions that will throw a compile-time error when they are not pure.
Your definition of 'pure' is different from my definition of 'pure'.
A 'pure' (as in functional programming) function ~can~ use external variables and still be called pure. It must not modify these variables, but it would be perfectly fine to have a sin(x) where you provide π as an external value. Changing π will change the actual output value, but if you repeat the calculation it will a) result in the same output value and b) x and π will not be modified.
In reply to Re^3: How to call a perl function without its context?
by Monk::Thomas
in thread How to call a perl function without its context?
by kitomer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |