(m: MathJSON)
| 731 | ]); |
| 732 | |
| 733 | function isSpecialHeaded(side: MathJSON): boolean { |
| 734 | return ( |
| 735 | Array.isArray(side) && typeof side[0] === 'string' && !CORE_HEADS.has(side[0]) |
| 736 | ); |
| 737 | } |
| 738 | |
| 739 | /** A match of the form `[Head, _w1, _w2, …]` (distinct bare wildcards only): |
| 740 | * such a rule rewrites EVERY occurrence of `Head` its guards admit. */ |
| 741 | export function isBareGenericCall(m: MathJSON): boolean { |
| 742 | return ( |
| 743 | Array.isArray(m) && |
| 744 | typeof m[0] === 'string' && |
| 745 | !m[0].startsWith('_') && |