static Function < ISeq < Item > , Double > fitness ( final double size ) { return items -> { final Item sum = items . stream ( ) . collect ( Item . toSum ( ) ) ; return sum . size <= size ? sum . value : 0 ; } ; }
Creating the fitness function .