I want to create my own function KeyFreeQ
using Mathematica's functions as little as possible.
For example:
I already have my own function FreeQ
:
meuFreeQ // ClearAll
meuFreeQ[{n_, y___}, n_] := False;
meuFreeQ[{x_, y___}, n_] := meuFreeQ[{y}, n];
meuFreeQ[{}, n_] := True;
How can I do the same for KeyFreeQ
?
CiearAll
when you do not give a function attributes. There is no reason to useSetDelayed
when the righthand side is a constant. $\endgroup$FreeQ[{{1}}, 1] =!= meuFreeQ[{{1}}, 1]
. Is this your code? Because I am not sure why are you stuck atKeyFreeQ
if you already did this. $\endgroup$