title: What is a "function shape" with respect to functional interfaces in Java 8?
body: <p>In Java 8 the new package <strong>java.util.function</strong> contains a lot of functional interfaces. The documentation for that package (<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html" rel="nofollow">http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html</a>) makes several references to "function shapes":</p>
  
  <ul>
  <li>There are several basic <strong>function shapes</strong>, including Function (unary function from T to R), Consumer (unary function from T to void), Predicate (unary function from T to boolean), and Supplier (nilary function to R).</li>
  <li><strong>Function shapes</strong> have a natural arity based on how they are most commonly used. The basic <strong>shapes</strong> can be modified by an arity prefix to indicate a different arity, such as BiFunction (binary function from 
  T and U to R).</li>
  <li>There are additional derived <strong>function shapes</strong> which extend the basic <strong>function shapes</strong>, including UnaryOperator (extends Function) and BinaryOperator (extends BiFunction).</li>
  </ul>
  
  <p>I had never heard of the term "function shape" before, and I can barely find a reference to it anywhere except in the documentation above, but since that is Oracle's formal documentation on functional interfaces I'd like to understand it. </p>
  
  <p>Can anyone provide a definition of "function shape", and invent an example? Is it a general term in Computer Science, or does it relate only to Java 8? And how is function shape related to a function descriptor (such as <em>(T) -> boolean</em> for the Predicate&lt;T&gt; interface)?</p>
  
  <p><strong>UPDATE</strong>
  The two comments below from Brian Goetz answer the questions I raised in this post. </p>