install termux from F-Droid.
apt update| <html> | |
| <head> | |
| <title>Single Html React</title> | |
| <script src='https://unpkg.com/requirejs/require.js'></script> | |
| </head> | |
| <body> | |
| <div id='app'></div> | |
| <script id='main' type='text/babel'> | |
| 'strict'; |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| // Array & List Partition |
| // Trampoline: | |
| // Tail recursion optimization technique. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using static System.Console; |
| using System; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace WpfAsyncCommandTest | |
| { | |
| public static class TaskEx | |
| { | |
| /// <summary> | |
| /// 非同期処理を実行するアクションです。 |
| "use strict" | |
| const curry = fn => | |
| curryN(fn.length, fn) | |
| const curryN = (n, fn) => | |
| rename(fn.name, (...a) => { | |
| const num_ = count_(a) | |
| const len = a.length - num_ | |
| return (num_ == 0 && len >= n) ? |
| test('try implement LINQ.', () => { | |
| class Enumerable { | |
| static from(array) { | |
| return new Enumerable( | |
| function*() { | |
| yield* array; | |
| }) | |
| } | |
| constructor(generator) { |
| // | |
| // ExpressionConverter | |
| // | |
| // Syntax | |
| // | |
| // Top = '$' CStr | . Expr . | |
| // CStr = cs { '{' . Expr . '}' cs }* | |
| // Expr = Lor . '?' . Expr . ':' . Expr | |
| // Expr = Lor | |
| // Lor = Land { . '||' . Lor } |
| // | |
| // AST Generator & Evaluator | |
| // based on Recursive Descent Parser without back-tracking | |
| // | |
| // Syntax | |
| // | |
| // E := T { [ '+' '-'' ] E } | |
| // T := U { [ '*' '/' '%' ] T } | |
| // U := [ '+' '-' '' ] F | |
| // F := '(' E ')' | [ '0' '1' ... '9' ] |