(a: Json, b: Json)
| 392 | } |
| 393 | |
| 394 | function divide(a: Json, b: Json): Json { |
| 395 | if ( |
| 396 | typeof a === 'number' && |
| 397 | typeof b === 'number' && |
| 398 | Number.isInteger(a) && |
| 399 | Number.isInteger(b) |
| 400 | ) |
| 401 | return ['Rational', a, b]; |
| 402 | return ['Divide', a, b]; |
| 403 | } |
| 404 | |
| 405 | // --------------------------------------------------------------------------- |
| 406 | // WL → Compute Engine name mapping |
no test coverage detected