我想编写这种程序的(这是一个简单的例子来解释我想做些什么):F# - For循环的问题在F#
// #r "FSharp.PowerPack.dll"
open Microsoft.FSharp.Math
// Definition of my products
let product1 = matrix [[0.;1.;0.]]
let product2 = matrix [[1.;1.;0.]]
let product3 = matrix [[1.;1.;1.]]
// Instead of this (i have hundreds of products) :
printfn "%A" product1
printfn "%A" product2
printfn "%A" product3
// I would like to do something like this (and it does not work):
for i = 1 to 3 do
printfn "%A" product&i
预先感谢您!!!! !
您可以添加'produc t1'到'productN'到列表中,'lst'和do:'用于制作printfn“%A”prod'。那是你的追求? – Daniel