繁体   English   中英

数组x的索引n处的项目值的惯用J

[英]Idiomatic J for value of item at index n of array x

在J语言中,返回数组x的索引n处的项目值的惯用词或短语是什么? {::的文档似乎与装箱的值有关,将普通数组作为事后的想法。

    nth =: {:: NB. This is what I have found, but is there a better word?
    2 nth 5 12 73 23 89
73
    1 nth 3 3 $ i.9
3 4 5

您正在{ )寻找。 它从数组中返回项目

   2 { 5 12 73 23 89
73
   2 4 { 5 12 73 23 89
73 89
   2 { i. 4 5
10 11 12 13 14

来自的一些参考:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM