9/21/2023 0 Comments Should i learn lambda calculusThe equivalent to the above JavaScript function f, when written with lambda calculus, is: In lambda calculus, the process of applying concrete arguments to an abstraction, and reducing the resulting expression is known as beta reduction. Here, f takes 2 arguments - a function x and a value y, and calls x with y as an argument. In JavaScript when we invoke a (pure) function with its arguments, the function gets evaluated and it returns the evaluated result: const f = (x, y) => x(y) The above process is known as beta reduction, which I will talk more about now. In the above, the \(\) syntax indicates that we are going to substitute all instances of \(x\) in the function with \(3\). apply the function to a concrete argument, we use the following syntax:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |