Skip to main content

Questions tagged [pure-functions]

For questions about functions that give identical outputs for identical inputs between separate calls and do not have any program-visible side effects.

9 votes
2 answers
487 views

Can total (primitive) corecursion be implemented?

I'm trying to understand how to implement corecursion in a total functional context. I've already implemented recursion using standard techniques (for loops) but I ...
Corbin's user avatar
  • 901
3 votes
3 answers
254 views

What are the downsides, if any, of using implicit function purity in an impure language?

An idea I had for one of my languages recently was this: function purity makes it easier to do certain optimizations. However, the language I'm designing is an impure imperative language that has an ...
Seggan's user avatar
  • 3,403
7 votes
3 answers
824 views

How to verify function purity in an imperative language?

A pure function in an imperative language means one with no observable side-effects, which when called multiple times with identical arguments will always return identical results, and which doesn't ...
kaya3's user avatar
  • 22.4k