anchor.diff:      }
   ----
   
  -However, this approach scales poorly because it does not perform an <<incrementalScoreCalculation,incremental calculation>>.
  -In the previous example,when the planning variable of a single `Talk` intety changes, to recalculate the score the Java streams package must execute the entire stream from scratch.
  -
  -//COMMENT: Lukas I have made the Java streams API lowercase and not code - it looks like it's a general term that includes specific packages, for exmpl java.util.stream. Let me know if I'm mistaken. Also, if I'm using 'package' incorrectly.
  -
  -On the other hand, the `ConstraintStreams` API uses <<incrementalScoreCalculation,deltas>>:
  +However, that scales poorly because it doesn't do an <<incrementalScoreCalculation,incremental calculation>>:
  +When the planning variable of a single `Talk` changes, to recalculate the score,
  +the normal Streams API has to execute the entire stream from scratch.
  +
  +On the other hand, the ConstraintStreams API uses <<incrementalScoreCalculation,deltas>>:
   
   ////
   TODO Replace the previous sentence when PLANNER-1709 is fixed.
  
positive.code: 
  
  [[constraintStreamsGroupingAndCollectors]]
  
  == Constraint Stream API grouping and collectors
  
  Grouping collects items in a stream according to user-provided criteria, also called a group key. This is similar to what a `GROUP BY` SQL clause does. Additionally, some grouping operations also accept one or more collectors, which provide various aggregation functions.
  
  For example, the following code snippet groups all processes by the computer they run on, sums up all of the power required by the processes on that computer using the `ConstraintCollectors.sum(...)` collector, and then penalizes every computer whose processes consume more power than is available:
  
  [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"]
  ----
  