anchor.diff:  [collectorsCountDistinct]
   ==== Collecting `countDistinct()`
   
  -The `ConstraintCollectors.countDistinct(...)` counts any element in a group once, regardless of how many times it occurs. For example, the following use of the collector provides  a number of talks in each unique room.
  +The `ConstraintCollectors.countDistinct(...)` counts any element in a group once, regardless of how many times it
  +occurs. For example, the following use of the collector gives a number of talks in each unique room.
   
   [source,java,options="nowrap"]
   ----
  
positive.code: 
  
  [[constraintStreamsIntroduction]]
  == `ContraintStreams` API
  
  You can use the Jave 8 streams API to implement an <<easyJavaScoreCalculation,easy score calculator>> that uses a functional approach, as illustrated in the following example:
  
  [source,java,options="nowrap"]
  ----
  
negative.code: :experimental:
  
  
  Constraint streams are a Functional Programming form of incremental score calculation in plain Java that is easy to
  read, write and debug.
  The API should feel familiar if you've worked with Java 8 Streams or SQL.
  
  [WARNING]
  ====
  The ConstraintStreams/ConstraintProvider API is an ongoing project.
  It works but it has many API gaps.
  Therefore, it is not rich enough yet to handle complex constraints.
  <<explainingTheScore,Constraint justifications>> may not function properly.
  ====
  
  // TODO Remove the previous sentence when PLANNER-1709 is fixed.
  
  To use constraint streams in your project, implement the `ConstraintProvider` interface and use the following in your
  solver config:
  
  [source,xml,options="nowrap"]
  ----
  