26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
import { fnType } from "../structures/function.js";
|
|
import { Type } from "../metacircular.js";
|
|
import {Bool, Double} from "./symbols.js";
|
|
|
|
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 = 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 = {l:[
|
|
{i: Double , t: Type },
|
|
|
|
{i: Double_to_Double_to_Double, t: Function },
|
|
{i: Double_to_Double_to_Bool , t: Function },
|
|
{i: Double_to_Double , t: Function },
|
|
{i: Double_to_Bool , t: Function },
|
|
|
|
{i: addDouble , t: Double_to_Double_to_Double },
|
|
{i: mulDouble , t: Double_to_Double_to_Double },
|
|
{i: eqDouble , t: Double_to_Double_to_Bool },
|
|
]};
|