From 73cdd8a12928ea999bcd448522a5201d03fbe359 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Tue, 7 Jun 2022 12:15:22 +0200 Subject: [PATCH] fix(curriculum): external y-combinator links in CIP (#46360) * fix(curriculum): external y-combinator links in CIP * broke the paragraph into two * Grammar typo Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> --- .../rosetta-code/y-combinator.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/y-combinator.md b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/y-combinator.md index 7913bc2d3b2..7dc932145df 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/y-combinator.md +++ b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/y-combinator.md @@ -8,15 +8,13 @@ dashedName: y-combinator # --description-- -In strict [functional programming]( "news: the principles of functional programming") and the [lambda calculus]( "wp: lambda calculus"), functions (lambda expressions) don't have state and are only allowed to refer to arguments of enclosing functions. This rules out the usual definition of a recursive function wherein a function is associated with the state of a variable and this variable's state is used in the body of the function. The [Y combinator](https://mvanier.livejournal.com/2897.html) is itself a stateless function that, when applied to another stateless function, returns a recursive version of the function. The Y combinator is the simplest of the class of such functions, called [fixed-point combinators]( "wp: fixed-point combinator"). +In strict [functional programming]( "news: the principles of functional programming") and the lambda calculus, functions (lambda expressions) don't have state and are only allowed to refer to arguments of enclosing functions. This rules out the usual definition of a recursive function wherein a function is associated with the state of a variable and this variable's state is used in the body of the function. + +The Y combinator is itself a stateless function that, when applied to another stateless function, returns a recursive version of the function. The Y combinator is the simplest of the class of such functions, called fixed-point combinators. # --instructions-- -Define the stateless Y combinator function and use it to compute [factorial](https://en.wikipedia.org/wiki/Factorial "wp: factorial"). The `factorial(N)` function is already given to you. **See also:** - - +Define the stateless Y combinator function and use it to compute the factorials. The `factorial(N)` function is already given to you. # --hints--