A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
5
Task/Search-a-list/Factor/search-a-list.factor
Normal file
5
Task/Search-a-list/Factor/search-a-list.factor
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
: find-index ( seq elt -- i )
|
||||
'[ _ = ] find drop [ "Not found" throw ] unless* ; inline
|
||||
|
||||
: find-last-index ( seq elt -- i )
|
||||
'[ _ = ] find-last drop [ "Not found" throw ] unless* ; inline
|
||||
Loading…
Add table
Add a link
Reference in a new issue