| 346 | * tier can bridge. Keys are lowercase. A curated suggestion is returned only |
| 347 | * when its target operator is actually visible in the current scope chain. |
| 348 | */ |
| 349 | const CURATED_SYNONYMS: Record<string, string> = { |
| 350 | split: 'StringSplit', |
| 351 | push: 'Append', |
| 352 | ceiling: 'Ceil', |
| 353 | // JavaScript Array method names. |
| 354 | some: 'Any', |
| 355 | every: 'All', |
| 356 | // Wolfram Language names. These are SUGGESTIONS, not aliases: the operator |
| 357 | // they point at is the right neighborhood, but the call shape often differs |
| 358 | // (`Accumulate[xs]` vs `Scan(xs, Add)`). The namespace stays Epsil-native. |
| 359 | total: 'Sum', |
| 360 | select: 'Filter', |
| 361 | cases: 'Filter', |
| 362 | memberq: 'Contains', |
| 363 | accumulate: 'Scan', |
| 364 | randomreal: 'Random', |
| 365 | randominteger: 'Random', |
| 366 | nest: 'Iterate', |
| 367 | nestlist: 'Iterate', |
| 368 | }; |
| 369 | |
| 370 | export function suggestOperatorName( |
| 371 | ce: IComputeEngine, |