当前位置: 动力学知识库 > 问答 > 编程问答 >

Implementation of arrays in F#

问题描述:

I have a question:

type Diversion = Pile[]

// allPilesEmpty: Diversion -> bool

I'm new in F#, and I have such an implementation to do.

Could you help me how to implement allPilesEmpty function?

Thanks.

网友答案:
  type Diversion = Pile array

  let allPilesEmpty (diversion:Diversion) =
    diversion.Length = 0

Something like this maybe?

分享给朋友:
您可能感兴趣的文章:
随机阅读: