这是否存在?如果不是最好的创造方式是什么?
答案 0 :(得分:4)
如果您想在目标值之后返回所有值,您可以使用下次查找
例如:
data: copy [1 2 3 4 5 6 7 8 9]
select data 5
== 6 ;; returns the next value only.
find data 5
== [5 6 7 8 9] ;; returns the series at that point, so ...
next find data 5
== [6 7 8 9] ;; ... returns the series after that point.
如果您只想要下一个N项,请添加副本/部分... N
例如(接下来的三个项目):
copy/part next find data 5 3
== [6 7 8]
我将留下您在找不到值时添加错误代码:
next find data 0
答案 1 :(得分:3)
使用find / tail,
>> find/tail [a b c d e] 'c
== [d e]
>> find/tail [a b c d e] 'x
== none