Skip to content

Commit

Permalink
fix: テンプレート修正
Browse files Browse the repository at this point in the history
  • Loading branch information
taizod1024 committed Sep 16, 2021
1 parent 73c38dd commit 5709fdf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions template/default.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// main
(async () => {
// util for input
const rl = require('readline').createInterface({ input: process.stdin });
const lineiter = rl[Symbol.asyncIterator]();
const readiter = (async function* () { for await (const line of lineiter) for (const word of line.split(" ")) yield await word; })();
const chariter = (async function* () { for await (const line of lineiter) for (const word of line.split(" ")) for (const char of word.split("")) yield await char; })();
const read = async () => String((await readiter.next()).value);
const readchar = async () => String((await chariter.next()).value);
const rl = require("readline").createInterface({ input: process.stdin });
const lineit = rl[Symbol.asyncIterator]();
const wordit = (async function* () { for await (const line of lineit) for (const word of line.split(" ")) yield await word; })();
const charit = (async function* () { for await (const line of lineit) for (const word of line.split(" ")) for (const char of word.split("")) yield await char; })();
const read = async () => String((await wordit.next()).value);
const readchar = async () => String((await charit.next()).value);

// util for es6
const fromto = function* (from: number, to: number, step = 1) { for (let x = from; x <= to; x += step) yield x; };
Expand Down

0 comments on commit 5709fdf

Please sign in to comment.