September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,15 +1,15 @@
func compose(f,g) {
func (*args) {
f(g(args...));
f(g(args...))
}
}
var cube = func(a) { a.pow(3) };
var croot = func(a) { a.root(3) };
var cube = func(a) { a.pow(3) }
var croot = func(a) { a.root(3) }
var flist1 = [Math.method(:sin), Math.method(:cos), cube];
var flist2 = [Math.method(:asin), Math.method(:acos), croot];
var flist1 = [Num.method(:sin), Num.method(:cos), cube]
var flist2 = [Num.method(:asin), Num.method(:acos), croot]
flist1.range.each { |i|
say compose(flist1[i], flist2[i])(0.5);
for a,b (flist1 ~Z flist2) {
say compose(a, b)(0.5)
}