//3
const map = function(a, ...args) {
console.log(3)
return a.map(...args)
}
//1
function mapper(f, ...args) {
console.log(1)
return a => map(a, f)
}
//4
const increment = (x) => {
console.log(4)
return x+1
}
const incrementAll = mapper(increment)
console.log(incrementAll.toString())
//2
console.log(2)
let res = incrementAll([1,2,3])
console.log(res)
1
a => map(a, f)
2
3
4
4
4
[ 2, 3, 4 ]
reader.onloadend = () => {
const text = reader.result
console.log(text);
this.parseFile()
}
parse.js?t=1661514641173:35 Uncaught TypeError: this.parseFile is not a function
at reader.onloadend (parse.js?t=1661514641173:35:18)
//ADD my object
List<String> lcolumns = new List<string>();
lcolumns.Add("time");
lcolumns.Add("usr");
lcolumns.Add("param1");
var columns = lcolumns.Distinct().ToArray<String>();
//Генерируем объект
AssemblyName ClassTable = new AssemblyName("ClassTable");
AssemblyBuilder ab =
AssemblyBuilder.DefineDynamicAssembly(
ClassTable,
AssemblyBuilderAccess.Run);
ModuleBuilder mb =
ab.DefineDynamicModule(ClassTable.Name);
TypeBuilder tb = mb.DefineType(
"MyType",
TypeAttributes.Public);
foreach (String colomn in columns) {
FieldBuilder column= tb.DefineField(
colomn,
typeof(String),
FieldAttributes.Public);
}
Type tTable = tb.CreateType();
object oTable = Activator.CreateInstance(tTable);
???
А если родители будут разные то будет сравнение и неизбежные конфликты.
Правильно я понимаю?