September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue