2D列表/数组的每个元素可以使用“foreach”吗?我尝试了代码:valn_vec=(0to2).map(i=>(0to2).map(j=>Wire(UInt(3.W))))n_vec.foreach((i:Int)=>(n_vec(i).foreach((j:Int)=>{n_vec(i)(j):=i.U+j.U})))错误消息是top.scala:24:error:typemismatch;found:Int=>Unitrequired:chisel3.core.UInt=>?n_vec(i).foreach((j:Int)=>{^您能否启发我是否可以以这种方式使用它,甚至如何使用?看答