irgendwas mit es6
This commit is contained in:
parent
b9d997b652
commit
20c5ea20de
@ -11,7 +11,7 @@ const hsimports = [
|
||||
"Data.Ord", "Data.Set", "Data.String", "Data.Tuple", "Data.Word"
|
||||
].map(imp => { return `import qualified ${imp}`; }).join("\r\n");
|
||||
|
||||
function sandbox(lang, code) {
|
||||
const sandbox = (lang, code) => {
|
||||
const langs = {
|
||||
cpp: {
|
||||
"LanguageChoice": "7",
|
||||
@ -83,18 +83,18 @@ function sandbox(lang, code) {
|
||||
reject("Error!");
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function bfgen(text) {
|
||||
const bfgen = text => {
|
||||
let out = "+".repeat(10) + "[";
|
||||
let repeat = 0;
|
||||
for (let i = 0; i < text.length; i++)
|
||||
repeat = text.charCodeAt(i) - text.charCodeAt(i) % 10;
|
||||
out += repeat > 10 ? '>' + "+".repeat(repeat / 10) : null;
|
||||
out += repeat > 10 ? ">" + "+".repeat(repeat / 10) : null;
|
||||
out += "<".repeat(out.split(">").length - 1) + "-]";
|
||||
for (let i = 0; i < text.length; i++)
|
||||
out += ">" + "+".repeat(text.charCodeAt(i) % 10) + ".";
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
export { maxoutput, sandbox, bfgen, hsimports };
|
Loading…
Reference in New Issue
Block a user