F#ではこれを行うことができます:
type coord = float * float //Type for a 2D-float-tupple
let myDepthCurve1 = { coords = [(1., 2.); (3., 4.)]; depth = 9.4 }
しかし、私はこれを行うことはできません:
type coord = { longitude : float; latitude : float } //Type for a 2D-float-record
let myDepthCurve1 = { coords = [(longitude = 1., latitude = 2.); (longitude = 3., latitude = 4.)]; depth = 9.4 }
coordタイプのレコードのフィールドにラベルが付けられていると、一度に深度曲線を作成できないというのは本当ですか?