Letrec. index in stdlib. fixing NaNs when measuring things without gaps, w or h. more window management stuff in OS

This commit is contained in:
Dustin Swan 2026-02-12 17:26:55 -07:00
parent db4abfa450
commit 5f592f40bf
No known key found for this signature in database
GPG key ID: 30D46587E2100467
5 changed files with 89 additions and 15 deletions

View file

@ -71,8 +71,8 @@ export function compile(ast: AST, useStore = true, bound = new Set<string>(), to
case 'let':
const newBound = new Set([...bound, ast.name]);
return `((${sanitizeName(ast.name)}) =>
${compile(ast.body, useStore, newBound, topLevel)})(${compile(ast.value, useStore, bound, topLevel)})`;
return `(() => { let ${sanitizeName(ast.name)} = ${compile(ast.value, useStore, newBound, topLevel)};
return ${compile(ast.body, useStore, newBound, topLevel)}; })()`;
case 'match':
return compileMatch(ast, useStore, bound, topLevel);