Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么这会失败L is [1,2,3,4],这有效:L = [1,2,3]?
L is [1,2,3,4]
L = [1,2,3]
但是L is 1,L = 1两者的工作方式相同。
L is 1
L = 1
is仅应在评估右侧的算术运算时使用。IE:
is
X is 1 + 2 + 3
is/2将右手结构计算为算术表达式。如果它不是有效的算术表达式或数字,则is/2失败。否则,算术表达式求值的数字与[大概]未绑定的左侧值统一。
is/2