Cannot append list to list of lists

Hello,

This bit of code

var a=List[List[Float64]]([1.0, 2.0, 3.0])
var b=List[Float64](22, 33, 44)
a.append(b)

fails with Mojo 0.25.6.0.dev2025091105 (07937a3a)

/workspace/JTC/tmp/t1.mojo:5:12: error: ‘List[Float64]’ is not implicitly copyable because it does not conform to ‘ImplicitlyCopyable’
a.append(b)

It worked with previous versions.

Is there another way to do this?

Lucian Anton

try a.append(b^) or a.append(b.copy())

1 Like

Yep, it makes sense and it works. Thanks!