예상 나는 한 다음 코드를식
type point = { x : float; y : float; z : float }
type dpoint = { dx : float; dy : float; dz : float }
type physical_object = { position : point; velocity : dpoint }
let move p dp = {x = p.x + dp.x; y = p.y + dp.y; z = p.z + dp.z}
나는이 오류가 무엇입니까 :
File "code.ml", line 4, characters 21-24:
Error: This expression has type float but an expression was expected of type
int
p.x
이 왜
을 강조를? 레코드 필드를 올바르게 참조하지 않습니까?