june / Search

0 gustos
0 bifurcaciones
1 archivos
Última actividad 3 months ago
A somewhat optimized linear search algorithm for unordered collections.
1 ||:: insert :items: (1 2 foo 3 4)
2 :: search :for: (1 2 3 4 foo 1 2 3 4 bar)
3
4 ||:@include: lib/rpn.nv
5
6 |:: insert? :items: $x|
7 :front: $x
8 |:: insert|
9
10 |:: search? :for: $x|