robpike / ivy

ivy, an APL-like calculator
Other
1.32k stars 103 forks source link

`mix` and `split` are not inverses of each other #154

Closed fzipp closed 1 year ago

fzipp commented 1 year ago

mix and split are supposed to be each other's inverses, but currently they are not:

A = 3 3 3 rho iota 9; A
    1 2 3
    4 5 6
    7 8 9

    1 2 3
    4 5 6
    7 8 9

    1 2 3
    4 5 6
    7 8 9
split A
    (1 2 3 4 5 6 7 8 9) (1 2 3 4 5 6 7 8 9) (1 2 3 4 5 6 7 8 9)
mix split A
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9