1
$\begingroup$

I have a function application:

E1 E2

Can someone please show me an example, how to execute function?

$\endgroup$

closed as unclear what you're asking by David Richerby, Evil, Rick Decker, Juho, Gilles Feb 12 '17 at 19:41

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ It seems you are having trouble with some basic concepts, I recommend looking at the first chapter of Lambda-Calculus and Combinators: An Introduction, it has lots of examples. $\endgroup$ – Aristu Feb 3 '17 at 11:42
  • $\begingroup$ I don't understand what you mean by "executing a function." $\endgroup$ – David Richerby Feb 3 '17 at 11:57
  • $\begingroup$ I mean apply E1 to E2. $\endgroup$ – zero_coding Feb 3 '17 at 12:32
2
$\begingroup$

If you have at least one abstraction just go on $\beta$-reducing. It just works like taking an input $x$ and computing $f(x)$.

$$ (\lambda x. x + 1)1$$ is an application.

$$ [1/x](x + 1)$$ $$ (1+1) \rightarrow_\beta 2$$

$\endgroup$
  • $\begingroup$ If I do not have any abstraction? $\endgroup$ – zero_coding Feb 3 '17 at 12:05
  • 2
    $\begingroup$ @zero_coding Application can only be reduced when there's an abstraction on the left. If this happens nowhere in the whole lambda term, then the term is a normal form (has been already reduced as far as possible). $\endgroup$ – chi Feb 4 '17 at 15:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.