function h(x,y){ if(x%2+y==0) return y; else return h(x,y+1); }
h(10,0)
ausführen
Wenn x gerade, dann 0, sonst ⊥
function h1(x,y){ if(x%2-y==0) return y; else return h1(x,y+1); }
h1(10,0)
Wenn x gerade, dann 0, sonst 1
function monus(x,y){ if(x<=y) return 0 else return x-y; } function h2(x,y){ if(monus(Math.pow(x, 2),y)==0) return y; else return h2(x,y+1); }
h2(10,0)
x-quadrat
function h3(x,y){ if(monus(Math.pow(y, 2),x)==0) return y; else return h3(x,y+1); }
h3(10,0)
Liefert 0.