new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
8
Task/Binary-search/PicoLisp/binary-search-1.l
Normal file
8
Task/Binary-search/PicoLisp/binary-search-1.l
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(de recursiveSearch (Val Lst Len)
|
||||
(unless (=0 Len)
|
||||
(let (N (inc (/ Len 2)) L (nth Lst N))
|
||||
(cond
|
||||
((= Val (car L)) Val)
|
||||
((> Val (car L))
|
||||
(recursiveSearch Val (cdr L) (- Len N)) )
|
||||
(T (recursiveSearch Val Lst (dec N))) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue