为什么我必须使用 switch 将 typeof 转换为字符串才能使其工作?
这不起作用:
typeof: type? get 'optional
switch typeof [
word! [
print "word"
]
string! [
print "string"
]
]
这有效:
typeof: type? get 'optional
switch to-string typeof [
"word" [
print "word"
]
"string" [
print "string"
]
]