开发者

Behavior of Part inside Function

开发者 https://www.devze.com 2023-01-23 16:17 出处:网络
The following gives some strange \"Part\" warnings Clear[f]; f = Function[{x}, x[[1]] == x[[2]]] However if I execute the second line again, it works without warnings, any idea what\'s goin开发者_

The following gives some strange "Part" warnings

Clear[f];
f = Function[{x}, x[[1]] == x[[2]]]

However if I execute the second line again, it works without warnings, any idea what's goin开发者_运维技巧g on?


Are you sure? I don't see any warnings in version 7.0.1:

In[1]:= Clear[f];
        f=Function[{x},x[[1]]==x[[2]]]

Out[2]= Function[{x},x[[1]]==x[[2]]]
0

精彩评论

暂无评论...
验证码 换一张
取 消