![[next]](next.gif)
![[previous]](previous.gif)
![[up]](up.gif)
![[top]](top.gif)
position(VisibleList,Function) -- find first element of a list satisfying a condition
Synopsis:
Code:
-- ../../../Macaulay2/m2/structure.m2:13-19
position(VisibleList,Function) := (v,f) -> (
ret := null;
select(
1,
apply(#v, i -> (i,v#i)),
(i,x) -> f(x) and (ret = i; true));
ret)
![[next]](next.gif)
![[previous]](previous.gif)
![[up]](up.gif)
![[top]](top.gif)