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 전화가있어 컴퓨터에있을 필요가 없습니다. 이제 내가 키보드에서 백틱을 입력하는 방법을 알아낼 수 있다면 ... 'aha', 이제는 막을 수 없어 :) – Brian
낮은 대기 시간의 스택 오버플로 – jlezard