Conditional use in simpleFunction

I’m still trying to figure out the things aloud, etc in simpleFunction. (Like when do I need “\” or just “” or can I paste in formulas right from the calculator latex)

I have a function that I’d love to return a 1 or 0, are conditionals aloud within a function?
I’ve tried this and it returns NaN:

correct = simpleFunction("\\abs(a-b)<=0.001:1,0","a","b")

If not, is there a way to make a function that checks a function? Or would I just need to manually write lines for each case I’m checking? Like is there a more efficient way than doing this?
correct1 = when simpleFunction("\\abs(a-b)","a","b").evaluateAt(number1,number2)<=0.001 1 otherwise 0

If you have a graph component it’s best to do it there. I’m not sure the exact context but using lists and totals have always worked for me.

Ok–thanks Jay! Just saw your calculator example too.

No problem, thanks for reminding me, I almost forgot to post:
https://www.desmos.com/calculator/ovf9bi9jug