<p>The usual function type <code>A => B</code> now stands for a function that can capture arbitrary capabilities. We call such functions <em>impure</em>. By contrast, the new single arrow function type <code>A -> B</code> stands for a function that cannot capture any capabilities, or otherwise said, is <em>pure</em>. One can add a capture set after the arrow of an otherwise pure function. For instance, <code>A ->{c, d} B</code> would be a function that can capture capabilities <code>c</code> and <code>d</code>, but no others. This type is a shorthand for <code>(A -> B)^{c, d}</code>, i.e. the function type <code>A -> B</code> with possible captures <code>{c, d}</code>.</p>
0 commit comments