CatchTheTornado / CatchTheTornado/askql
[playground] Infinity is reported as null
- Dominant language
- TypeScript
- Stars
- 387
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following program:
```
ask {
const factorial: int(int) = fun(n:int):int {
if (n < 2) {
return n
}
n * factorial(n - 1)
}
200:factorial
}
```
In CLI the result is:
```
float ask(const('factorial',fun(let('n',get('$0')),if(call(get('<'),get('n'),2),block(return(get('n'))),block()),call(get('*'),get('n'),call(get('factorial'),call(get('-'),get('n'),1))))),call(get('factorial'),200))
Infinity
🦄
```
However, [Playground](https://cli.askql.org/) displays:
```
null
```
Contributor guide
Research direction
Reproduce the factorial program in the CLI and at https://cli.askql.org/, then compare how the Playground receives and renders the result. Trace the Playground's result-handling entry point and verify that the completed behavior displays Infinity rather than null for this program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100