4
私はF#レコードを使いたいと思っています。レースとランナーはレースを参照しています。ランナーとランナーはレースを参照しています。レギュラークラスと同じように、これはレコードで可能ですか?F#レコードは循環参照A - > B - > Aをサポートしていますか?
type Race = {
raceIdentifier : int
carriedWeightMean : decimal
prizeMoneyPercentileCountry : int64
noOfHorses : int
runners : Runner list
}
type Runner = {
horseId : int
finishPositionSequence : int64
lbw : decimal
horseNumberOfRaces : int
mutable race : Race
}
私はキーワード「と」を使用して試してみたが、これは動作していないようです:ない「で」、あなたがしたい
type Race = {
raceIdentifier : int
carriedWeightMean : decimal
prizeMoneyPercentileCountry : int64
noOfHorses : int
race : Race
} with Runner = {
horseId : int
finishPositionSequence : int64
lbw : decimal
horseNumberOfRaces : int
race : Race
}
コンピュータから離れる... – gradbot
私は今、Windowsの電話を持っている、コンピュータにする必要はありません。今、キーボードでバックティックを入力するしか方法がわからないのですが、今、私は止められません:) – Brian
低レイテンシのスタックオーバーフロー – jlezard