4 ms·
Guess, that is what I was asking. If you take any current functional language, and add the criteria that it must only use pure functions, then Int->Int is the
by FrustratedMonky 3y ago
Guess, that is what I was asking.
If you take any current functional language, and add the criteria that it must only use pure functions, then Int->Int is the same as described in the Total Language. Because if there are no outside interactions inside the function, it's 'pure', then the Int->Int is guaranteed.
Doesn't using only pure functions, equate to this Total Functions.
- deleted 3y ago[deleted]
- FrustratedMonky 3y agoThis might be one of those 'sloppy' definitions. From random search, seems like some people assume this : Pure=Total "A pure function must be total Firstly, a function must be total, this means that for each input that is provided to the function there must be a defined output."
- anon291 3y ago> If you take any current functional language, and add the criteria that it must only use pure functions, then Int->Int is the same as described in the Total Language. The function above is pure. In fact, all functions in Haskell are, even those returning IO.
- FrustratedMonky 3y agoThen they are also 'total' by some definitions. So they would match the criteria of the original post? By some definitions, to be 'pure' includes being 'total'. Guess, back to original question. The ideas in this paper from 2004, seems to have been incorporated into more common languages like Haskell in 2024.