lotta progress
This commit is contained in:
parent
29d20b2273
commit
bc91d9bf39
27 changed files with 317 additions and 475 deletions
|
|
@ -1,26 +1,15 @@
|
|||
import { fnType } from "../structures/function.js";
|
||||
import { Type } from "../metacircular.js";
|
||||
import {Bool, Double} from "./symbols.js";
|
||||
import { typedFnType } from "../structures/types.js";
|
||||
import { Type } from "../type.js";
|
||||
import {Bool, Double} from "./types.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, 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 },
|
||||
...typedFnType(addDouble, fnType => fnType(Double)(fnType(Double)(Double))),
|
||||
...typedFnType(mulDouble, fnType => fnType(Double)(fnType(Double)(Double))),
|
||||
...typedFnType(eqDouble, fnType => fnType(Double)(fnType(Double)(Bool))),
|
||||
]};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue