JoelSjogren icon

Untitled

JoelSjogren | PRO | 05/20/23 09:45:35 PM UTC | 0 ⭐ | 422 👁️ | Never ⏰ | []
text |

560 B

|

None

|

0 👍

/

0 👎

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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎