First version:
procedure binary search (: integer, : increasing integers)
while
if then
else
if then location
else location
return location
Second version:
procedure binary search (: integers, , : increasing integers)
if then
return
else if ( and ) then
return binary search()
else if ( and ) then
return binary search()
else return 0
{output is location of in if it appears; otherwise it is 0}