Having treated new 18.0 features in the previous lessons, I was thinking to describe some of the language enhancements next. Unless we have other requests.
@RGS The problem you have is that you are detecting if a value belongs to a new segment relative to its neighbour on the left, rather than how many segments ahead it is.
@RGS ah I think I got it! when we had a boolean, a 1 indicated a new partition would start there, or rather, we would have to jump 1 partition to the right; an integer n means we jump n partitions to the right, meaning we create n-1 empty partitions if n≥1
@RGS Yes, you were comparing interval indices, to see if they were growing or not. Instead, - computes the difference in interval index numbers, i.e. how many segments ahead of its neighbour on the left, any given value belongs in. 0 means "in the same segment". 1 means "in the next one". 2 means "skip one".
@ngn It originally used ⎕IO←0 by default, but having the bot use a different default than the main system (however wrong you may thing that default is) would be quite confusing.
Anyway, this shows another extension in 18.0, namely that ⍸⍣¯1 conveniently works, but what you might not notice is that it also shows a further extension of ⊂. Observe:
Another thing that ⎕JSON can now do is to understand and create JSON5: ⋄ (ns←⎕JSON⍠'Dialect' 'JSON5'⊢'{noQuotes: [0xdecaf,0xC0FFEE] /* comment */}').noQuotes ⋄ ⎕JSON⍠'Dialect' 'JSON5'⊢ns