Skip to main content
Glama
letrec.js•818 B
import { LazyArbitrary } from './_internals/LazyArbitrary.js'; import { safeHasOwnProperty } from '../utils/globals.js'; const safeObjectCreate = Object.create; export function letrec(builder) { const lazyArbs = safeObjectCreate(null); const tie = (key) => { if (!safeHasOwnProperty(lazyArbs, key)) { lazyArbs[key] = new LazyArbitrary(String(key)); } return lazyArbs[key]; }; const strictArbs = builder(tie); for (const key in strictArbs) { if (!safeHasOwnProperty(strictArbs, key)) { continue; } const lazyAtKey = lazyArbs[key]; const lazyArb = lazyAtKey !== undefined ? lazyAtKey : new LazyArbitrary(key); lazyArb.underlying = strictArbs[key]; lazyArbs[key] = lazyArb; } return strictArbs; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Digital-Defiance/mcp-screenshot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server