문제

I have two refs in SML:

val a = ref 5; val b = ref 6;

Currently a = b evaluates to false. Is it possible to somehow assign variable b so that a = b evaluates to true? Thanks

도움이 되었습니까?

해결책

No. It's not, they are pointers to different object.

Technically you could do

val a = ref 5;
val b = a;

That would work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top