use fnType everywhere to create function types

This commit is contained in:
Joeri Exelmans 2025-03-14 17:05:04 +01:00
parent a8260f2afb
commit 6023efc295
10 changed files with 33 additions and 27 deletions

View file

@ -1,3 +1,4 @@
import { fnType } from "../function_registry.js";
import {Type, Function} from "../metacircular.js";
import {Bool, Double} from "./symbols.js";
@ -6,10 +7,10 @@ export const addDouble = x => y => x + y;
export const mulDouble = x => y => x * y;
export const eqDouble = x => y => x === y;
const Double_to_Double = {in: Double, out: Double};
const Double_to_Bool = {in: Double, out: Bool};
export const Double_to_Double_to_Double = {in: Double, out: Double_to_Double};
export const Double_to_Double_to_Bool = {in: Double, out: Double_to_Bool};
const Double_to_Double = fnType({in: Double, out: Double});
const Double_to_Bool = fnType({in: Double, out: Bool});
export const Double_to_Double_to_Double = fnType({in: Double, out: Double_to_Double});
export const Double_to_Double_to_Bool = fnType({in: Double, out: Double_to_Bool});
export const ModuleDouble = [