September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,3 +1,4 @@
|
|||
Haystack ;:^:_1@(] ,. [ ((<'is not in haystack')"_)`(#@[ I.@:= ])`(8!:0@])} i.) Needles
|
||||
Washington is not in haystack
|
||||
Bush 4
|
||||
Needles e. Haystack
|
||||
0 1
|
||||
1 2 3 4 5 6 7 8 9 e. 2 3 5 60
|
||||
0 1 1 0 1 0 0 0 0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
msg=: (<'is not in haystack')"_ NB. not found message
|
||||
idxmissing=: #@[ I.@:= ] NB. indices of items not found
|
||||
fmtdata=: 8!:0@] NB. format atoms as boxed strings
|
||||
findLastIndex=: ;:inv@(] ,. [ msg`idxmissing`fmtdata} i:)
|
||||
|
||||
Haystack findLastIndex Needles NB. usage
|
||||
Washington is not in haystack
|
||||
Bush 7
|
||||
1 2 3 4 5 6 7 8 9 I. 2 3 5 60 6.66
|
||||
1 2 4 9 6
|
||||
(;:'eight five four nine one seven six three two') I. ;:'two three five sixty'
|
||||
8 7 1 7
|
||||
|
|
|
|||
3
Task/Search-a-list/J/search-a-list-4.j
Normal file
3
Task/Search-a-list/J/search-a-list-4.j
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Haystack ;:^:_1@(] ,. [ ((<'is not in haystack')"_)`(#@[ I.@:= ])`(8!:0@])} i.) Needles
|
||||
Washington is not in haystack
|
||||
Bush 4
|
||||
8
Task/Search-a-list/J/search-a-list-5.j
Normal file
8
Task/Search-a-list/J/search-a-list-5.j
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
msg=: (<'is not in haystack')"_ NB. not found message
|
||||
idxmissing=: #@[ I.@:= ] NB. indices of items not found
|
||||
fmtdata=: 8!:0@] NB. format atoms as boxed strings
|
||||
findLastIndex=: ;:inv@(] ,. [ msg`idxmissing`fmtdata} i:)
|
||||
|
||||
Haystack findLastIndex Needles NB. usage
|
||||
Washington is not in haystack
|
||||
Bush 7
|
||||
Loading…
Add table
Add a link
Reference in a new issue