【发布时间】:2020-02-10 09:44:41
【问题描述】:
package play
exists(obj, a) {
obj[a]
}
hello {
exists(input, "department")
contains(input["location"], "London")
}
world {
contains(input["location"], "London")
exists(input, "department")
}
输入 = { “部门”:“英语”, “位置”:“伦敦”}
上面的代码只匹配 hello。为什么world即使条件相同也不匹配,但顺序相反?
【问题讨论】: