import { BasicFun, Fun } from "../../../fun/state";
export const ArrayRepo = {
Operations: {
map: (f: BasicFun): Fun, Array> =>
Fun((_) => _.map(f)),
},
};
declare global {
interface Array {
random(): T;
}
}
Array.prototype.random = function (this: Array): a {
return this[Math.floor(Math.random() * this.length)];
};