box% python Python 3.11.3 (main, Apr 5 2023, 15:52:25) [GCC 12.2.1 20230201] on linux Type "help", "copyright", "credits" or "license" for more information. >>> def Q(x): ... u, v, w = x ... return 0, v, w ... >>> def P(x): ... u, v, w = x ... return u, 0, w ... >>> def F(x): ... u, v, w = x ... return 2*u, 3*v, 5*w ... >>> B = lambda f: lambda x: Q(f(P(x))) >>> F([1.4, 6.34, 3.14]) (2.8, 19.02, 15.700000000000001) >>> B(F)([1.4, 6.34, 3.14]) (0, 0, 15.700000000000001) >>> B(B(F))([1.4, 6.34, 3.14]) (0, 0, 15.700000000000001) >>>
Comments
0 B
|👍
/👎