title: Is a pure function idempotent?
body: <p>Is every pure function idempotent?</p>
  
  <p>I wouldn't ask such a crazy question if I hadn't seen this statement in the official <a href="https://docs.angularjs.org/guide/filter#creating-custom-filters" rel="nofollow">Angular.js tutorial</a>:</p>
  
  <blockquote>
    <p>The filter function should be a pure function, which means that it
    should be stateless and idempotent. Angular relies on these properties
    and executes the filter only when the inputs to the function change.</p>
  </blockquote>
  
  <p>This seems to imply that a pure function should be both stateless and idempotent, which does not match what I think is the common definition of a pure function.</p>
  
  <p>In fact, it does not even match the example below in the page, where reversing the characters in a string is presented an example of a filter: clearly, reversing a string changes the string in a way that it changes again if the string is reversed once more.</p>
  
  <p>Even more curious: if you look at the Wikipedia page for pure function linked in that tutorial (I can only post one link because I'm a new user, sorry...): it reports <em>sin</em>(<em>x</em>) as an example of a pure function.</p>
  
  <p>So, according to Angular.js, the sine is an idempotence, right?</p>
  
  <p>What am I missing?</p>