basic functionality, no generics
This commit is contained in:
commit
a8260f2afb
17 changed files with 615 additions and 0 deletions
26
primitives/double.js
Normal file
26
primitives/double.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import {Type, Function} 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 = {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};
|
||||
|
||||
|
||||
export const ModuleDouble = [
|
||||
{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 },
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue