19 lines
471 B
Plaintext
19 lines
471 B
Plaintext
import system'collections;
|
|
import system'routines;
|
|
import extensions;
|
|
|
|
public program()
|
|
{
|
|
var partial := (afs,af => (s => afs(af, s)));
|
|
|
|
var fs := (f,s => s.selectBy::(x => f(x)).summarize(new ArrayList()).toArray());
|
|
var f1 := (x => x * 2);
|
|
var f2 := (x => x * x);
|
|
|
|
var fsf1 := partial(fs, f1);
|
|
var fsf2 := partial(fs, f2);
|
|
|
|
console.printLine(fsf1(new int[]{2,4,6,8}).toString());
|
|
console.printLine(fsf2(new int[]{2,4,6,8}).toString())
|
|
}
|