> So are you saying there is a difference between `0..<Kn*bprg` and `0 .. 
> <Kn*bprg`?

The difference is between `..<` as a binary operator and `<` as a unary 
operator.

Briefly, `<x` is shorthand for `pred(x)`, while `x ..< y` is shorthand for 
`x..pred(y)`. What makes the difference in your code is that `<` as a unary 
operator has (unintuively) higher precedence than `*`, so `<Kn*bprg` is parsed 
as `(<Kn)*brpg`, which translates to `(Kn-1) * bprg`. This problem does not 
occur with `..<` as a binary operator, which has a lower precedence than 
multiplication (and if it didn't, you'd get a type error, because you'd be 
multiplying a range with an integer).

Reply via email to