F# - Display full results in F# interactive window

后端 未结 4 2215
礼貌的吻别
礼貌的吻别 2021-01-04 06:03

Disclaimer: Total F# Newbie question!

If I type the following into an F# file in Visual Studio

#light

let squares =
    se         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 06:13

    'seq' is a lazily-evaluated construct; it could be infinite, which is why FSI only shows the first few values. If you want to see it all, an easy thing to do is convert to a list, e.g.

    printf "%A" (squares |> Seq.tolist)
    

提交回复
热议问题