mir-algorithm icon indicating copy to clipboard operation
mir-algorithm copied to clipboard

fuse on array of string

Open fabienmica opened this issue 3 years ago • 1 comments

string[][] data = [["100", "1Y"], ["200", "2Y"], ["300", "3Y"]];  
data.fuse;  

This does not compile, because it goes to char level instead and shape do not match.
I also tried fuseAs!string but does not compile either.

fabienmica avatar Sep 21 '22 14:09 fabienmica

Looks like fuse calls fuseShape, which fails. This bug occurs with any array of strings.

It looks like the function looks through to the deep element type. So for instance,

writeln(fuseShape([100])); //prints [1]
writeln(fuseShape("100")); //prints [3]
writeln(fuseShape("1Y")); //prints [2]

jmh530 avatar Sep 21 '22 15:09 jmh530