Question: How to make piecewise evaluate its arguments, say limit inside piecewise?

Noticed something strange.  When I type

restart;
F:=x-> (x^4+3*x^3-3*x^2-2*x-24)/(x^4-4*x^3-13*x^2+62*x-56);
u:=x->piecewise(x=-4,limit(F(x),x=-4),true,F(x));
u(-4);

Gives Error, (in F) numeric exception: division by zero which means it did not hit the first condition x=-4

But when I write this

restart;
F:=x-> (x^4+3*x^3-3*x^2-2*x-24)/(x^4-4*x^3-13*x^2+62*x-56);
A:=limit(F(x),x=-4);
u:=x->piecewise(x=-4,A,true,F(x));
u(-4)

Now it gives expected result 15/47

To avoid defining many variables, like A above, I'd like to just write the  limit inside.

Is there a way to make Maple accept the limit inside piecewise as written above? i.e. have it evaluate to 15/47?

Help says "The piecewise function evaluates its arguments on an as-needed basis."

Not sure what this means.

I tried adding eval, as in 

u:=x->piecewise(x=-4,eval(limit(F(x),x=-4)),true,F(x));

But this did nothing

Maple 2025.2

 

Please Wait...