diff --git a/src/cat.ts b/src/cat.ts index 46b91b0..c30edd3 100644 --- a/src/cat.ts +++ b/src/cat.ts @@ -242,6 +242,10 @@ export const Primitives: Environment = { '%'(a, b) { return [(a as number) % (b as number)]; }, 'neg'(v) { return [-(v as number)]; }, + 'cos'(n) { return [Math.cos(n as number)]; }, + 'sin'(n) { return [Math.sin(n as number)]; }, + 'tan'(n) { return [Math.tan(n as number)]; }, + 'to'() { const n_or_ns = this.nextToken('to', (v: any): v is (symbol | symbol[]) => typeof v === 'symbol' || (Array.isArray(v) && v.every(w => typeof w === 'symbol')));