-
-
Save dwickstrom/b8b6e46bff1111097945a68de4b9762f to your computer and use it in GitHub Desktop.
Revisions
-
dwickstrom revised this gist
Jun 13, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ identity | **I** | Idiot | `id` | `identity` | `I` constant | **K** | Kestrel | `const` | `always` | `K` | `a → b → a` apply | **A** | | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | Thrush | `(&)` | `applyTo` | `T` | `a → (a → b) → b` duplication | **W** | Warble | `join`² | `unnest`² | `join`² | `(a → a → b) → a → b` flip | **C** | Cardinal | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | Bluebird | `(.)`, `fmap`² | `map`² | `compose`, `map`² | `(b → c) → (a → b) → a → c` substitution | **S** | Starling | `ap`² | `ap`² | `ap`² | `(a → b → c) → (a → b) → a → c` -
dwickstrom revised this gist
Jun 13, 2018 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ Name | # |Birds | [Haskell][] | [Ramda][] | [Sanctuary][] | Signature ------------:|-------|--------------|----------------|------------|-------------------|---------- identity | **I** | Idiot | `id` | `identity` | `I` | `a → a` constant | **K** | Kestrel | `const` | `always` | `K` | `a → b → a` apply | **A** | | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | Thrush | `(&)` | `applyTo` | `T` | `a → (a → b) → b` duplication | **W** | | `join`² | `unnest`² | `join`² | `(a → a → b) → a → b` flip | **C** | Cardinal | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | Bluebird | `(.)`, `fmap`² | `map`² | `compose`, `map`² | `(b → c) → (a → b) → a → c` substitution | **S** | Starling | `ap`² | `ap`² | `ap`² | `(a → b → c) → (a → b) → a → c` psi | **P** | | `on` | | `on` | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | | `fix` | | | `(a → a) → a` ----- -
Avaq revised this gist
Jan 4, 2018 . 1 changed file with 13 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,13 @@ Note that when I use the word "combinator" in this context, it implies "function combinator in the untyped lambda calculus". * [To Mock a Mocking Bird](https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/dp/0192801422) (book of combinatory puzzles and examples) * [Combinator Birds](http://www.angelfire.com/tx4/cus/combinator/birds.html) (summary of all combinators named by the book) * [CombinatorsJS](https://github.com/benji6/combinators-js) (implementation of all the same combinators in JavaScripts) * [Fantasy Combinators](https://github.com/fantasyland/fantasy-combinators) (implementation of common combinators in JavaScript) * [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) (collection of noteworthy combinators) * [Programming With Nothing](http://rubymanor.org/3/videos/programming_with_nothing) (talk) * [Church Encoding](https://en.wikipedia.org/wiki/Church_encoding) (wikipedia) * [Fixed-point combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator) (wikipedia) * [Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) (wikipedia) * [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) (wikipedia) * [BCKW combinator calculus](https://en.wikipedia.org/wiki/B,_C,_K,_W_system) (wikipedia) -
Avaq revised this gist
Dec 22, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Name | # | [Haskell][] | [Ramda][] | [Sanctuary][] | Signatu identity | **I** | `id` | `identity` | `I` | `a → a` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | `applyTo` | `T` | `a → (a → b) → b` duplication | **W** | `join`² | `unnest`² | `join`² | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)`, `fmap`² | `map`² | `compose`, `map`² | `(b → c) → (a → b) → a → c` -
Avaq revised this gist
Aug 28, 2017 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ Name | # | [Haskell][] | [Ramda][] | [Sanctuary][] | Signature ------------:|-------|----------------|------------|-------------------|---------- identity | **I** | `id` | `identity` | `I` | `a → a` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | `join`² | `unnest`² | `join`² | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)`, `fmap`² | `map`² | `compose`, `map`² | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`² | `ap`² | `ap`² | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | `on` | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` ----- -
Avaq revised this gist
Jun 9, 2017 . No changes.There are no files selected for viewing
-
Avaq revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ substitution | **S** | `ap`² | `ap`² | `ap`² psi | **P** | `on` | | `on` | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` ----- ¹) In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* -
Avaq revised this gist
Feb 13, 2017 . 1 changed file with 4 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,10 @@ identity | **I** | `id` | `identity` | `I` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | `join`² | `unnest`² | `join`² | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `map`² | `compose`, `map`² | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`² | `ap`² | `ap`² | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | `on` | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` @@ -18,15 +18,7 @@ fix-point¹ | **Y** | `fix` | | fix-point combinator is implemented. This variant is sometimes rererred to as the Z-combinator. ²) Algebras like `ap` have different implementations for different types. They work like Function combinators only for Function inputs. [Haskell]: https://www.haskell.org/ -
Avaq revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ duplication | **W** | `join`³ | `unnest`³ | `join`³ flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `compose`², `map`³ | `compose`, `map`³ | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`³ | `ap`³ | `ap`³ | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | `on` | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` **Notes** -
Avaq revised this gist
Feb 8, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,5 @@ * [Fixed-point combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator) * [Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) * [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) * [BCKW combinator calculus](https://en.wikipedia.org/wiki/B,_C,_K,_W_system) * [Programming With Nothing](http://rubymanor.org/3/videos/programming_with_nothing) -
Avaq revised this gist
Feb 4, 2017 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ Name | # | [Haskell][] | [Ramda][] | [Sanctuary][] | Signature ------------:|-------|-------------|--------------------|------------------------|---------- identity | **I** | `id` | `identity` | `I` | `a → a` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | `join`³ | `unnest`³ | `join`³ | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `compose`², `map`³ | `compose`, `map`³ | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`³ | `ap`³ | `ap`³ | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` **Notes** -
Avaq revised this gist
Feb 4, 2017 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,9 +5,9 @@ constant | **K** | `const` | `always` | `K` | `a apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | `join`³ | | `join`³ | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `flip` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `compose`² | `compose`, `map`³ | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`³ | `ap`³ | `ap`³ | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` @@ -27,7 +27,7 @@ fix-point¹ | **Y** | `fix` | | | `(a with the last input function provided. ³) Algebras like `ap` have different implementations for different types. They work like Function combinators only for Function inputs. [Haskell]: https://www.haskell.org/ [Ramda]: http://ramdajs.com/ -
Avaq revised this gist
Feb 4, 2017 . 1 changed file with 14 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ Name | # | [Haskell][] | [Ramda][] | [Sanctuary][] | Signature ------------:|-------|-------------|------------|------------------------|---------- identity | **I** | `id` | `identity` | `I` | `a → a` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | `join`³ | | `join`³ | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `C` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `compose`² | `B`, `compose`, `map`³ | `(b → c) → (a → b) → a → c` substitution | **S** | `ap`³ | `ap`³ | `S`, `ap`³ | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` **Notes** @@ -26,9 +26,8 @@ fix-point¹ | **Y** | `fix` | | | `(a → a) * The second input function is unary. The output function shares arity with the last input function provided. ³) Algebras like `ap` have different implementations for different types. They work like combinators only for Function inputs. [Haskell]: https://www.haskell.org/ [Ramda]: http://ramdajs.com/ -
Avaq revised this gist
Nov 21, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ * [Combinator Birds](http://www.angelfire.com/tx4/cus/combinator/birds.html) * [CombinatorsJS](https://github.com/benji6/combinators-js) * [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) * [To Mock a Mocking Bird](https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/dp/0192801422) * [Fantasy Combinators](https://github.com/fantasyland/fantasy-combinators) -
Avaq revised this gist
Nov 11, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ * [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) * [To Mock a Mocking Bird](https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/dp/0192801422) * [Fantasy Combinators](https://github.com/fantasyland/fantasy-combinators) * [Fixed-point combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator) * [Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) * [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) -
Avaq revised this gist
Nov 11, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,6 @@ * [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) * [To Mock a Mocking Bird](https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/dp/0192801422) * [Fixed-point combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator) * [Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) * [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) * [BCKW combinator calculus](https://en.wikipedia.org/wiki/B,_C,_K,_W_system) -
Avaq revised this gist
Nov 11, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,2 @@ * [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) * [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) -
Avaq revised this gist
Nov 11, 2016 . 2 changed files with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ fix-point¹ | **Y** | `fix` | | | `(a → a) ¹) In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is sometimes rererred to as the Z-combinator. ²) Ramda's `compose` behaves like the composition combinator only when: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) -
Avaq revised this gist
Jun 28, 2016 . 4 changed files with 0 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +0,0 @@ File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +0,0 @@ -
Avaq revised this gist
Jun 20, 2016 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,10 +18,13 @@ fix-point¹ | **Y** | `fix` | | | `(a → a) fix-point combinator is implemented. This variant is commonly rererred to as the Z-combinator. ²) Ramda's `compose` behaves like the composition combinator only when: * Both arguments are passed at the same time. Partial application does not work. * The number of functions given is exactly 2. All input functions are composed together in a fashion similar to `pipe`. * The second input function is unary. The output function shares arity with the last input function provided. ³) Ramda's `ap` behaves like the substitution combinator only when given the the input that `S` would take. For any other applicatives `ap` will run -
Avaq revised this gist
Jun 20, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,8 @@ fix-point¹ | **Y** | `fix` | | | `(a → a) ²) Ramda's `compose` behaves like the composition combinator only when given a unary function as input. For any other arity it's going to return a function which shares that arity. Ramda's `compose` is incapable of being partially applied with its first argument. The first two *must* be given at once. ³) Ramda's `ap` behaves like the substitution combinator only when given the the input that `S` would take. For any other applicatives `ap` will run -
Avaq revised this gist
Jun 17, 2016 . 1 changed file with 26 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,31 @@ Name | # | [Haskell][] | [Ramda][] | [Sanctuary][] | Signature ------------:|-------|-------------|------------|---------------|---------- identity | **I** | `id` | `identity` | `I` | `a → a` constant | **K** | `const` | `always` | `K` | `a → b → a` apply | **A** | `($)` | `call` | `A` | `(a → b) → a → b` thrush | **T** | `(&)` | | `T` | `a → (a → b) → b` duplication | **W** | | | | `(a → a → b) → a → b` flip | **C** | `flip` | `flip` | `C` | `(a → b → c) → b → a → c` compose | **B** | `(.)` | `compose`² | `B` | `(b → c) → (a → b) → a → c` substitution | **S** | | `ap`³ | `S` | `(a → b → c) → (a → b) → a → c` psi | **P** | `on` | | | `(b → b → c) → (a → b) → a → a → c` fix-point¹ | **Y** | `fix` | | | `(a → a) → a` **Notes** ¹) In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is commonly rererred to as the Z-combinator. ²) Ramda's `compose` behaves like the composition combinator only when given a unary function as input. For any other arity it's going to return a function which shares that arity. ³) Ramda's `ap` behaves like the substitution combinator only when given the the input that `S` would take. For any other applicatives `ap` will run different logic. [Haskell]: https://www.haskell.org/ [Ramda]: http://ramdajs.com/ [Sanctuary]: http://sanctuary.js.org/#combinator -
Avaq revised this gist
Jun 14, 2016 . 1 changed file with 15 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,19 @@ Name | # | Haskell | Ramda | S | Signature ------------:|-------|---------|----------|---|---------- identity | **I** | id | identity | ✓ | `a → a` constant | **K** | const | always | ✓ | `a → b → a` apply | **A** | ($) | call | ✓ | `(a → b) → a → b` thrush | **T** | (&) | | ✓ | `a → (a → b) → b` duplication | **W** | | | | `(a → a → b) → a → b` flip | **C** | flip | flip | ✓ | `(a → b → c) → b → a → c` compose | **B** | (.) | compose | ✓ | `(b → c) → (a → b) → a → c` substitution | **S** | | ap | ✓ | `(a → b → c) → (a → b) → a → c` psi | **P** | on | | | `(b → b → c) → (a → b) → a → a → c` fix-point\* | **Y** | fix | | | `(a → a) → a` \* In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is commonly rererred to as the Z-combinator. S: Whether the combinator was added to [Sanctuary](http://sanctuary.js.org/#combinator). -
Avaq revised this gist
Jun 14, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ thrush | **T** | (&) | | `a → (a → b) → b` duplication | **W** | | | `(a → a → b) → a → b` flip | **C** | flip | flip | `(a → b → c) → b → a → c` compose | **B** | (.) | compose | `(b → c) → (a → b) → a → c` substitution | **S** | | ap | `(a → b → c) → (a → b) → a → c` psi | **P** | on | | `(b → b → c) → (a → b) → a → a → c` fix-point\* | **Y** | fix | | `(a → a) → a` -
Avaq renamed this gist
Apr 21, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Avaq revised this gist
Mar 31, 2016 . 3 changed files with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ const S = f => g => x => f(x)(g(x)) const K = x => y => x const I = S(K)(K) const B = S(K(S))(K) const C = S(S(K(S(K(S))(K)))(S))(K(K)) const W = S(S)(K(S(K)(K))) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ const I = x => x; const K = x => y => x; const A = f => x => f(x); const T = x => f => f(x); const W = f => x => f(x)(x); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ [Collected Lambdas](http://jwodder.freeshell.org/lambda.html) -
Avaq revised this gist
Feb 18, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,5 +13,5 @@ fix-point\* | **Y** | fix | | `(a → a) → a` \* In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is commonly rererred to as the Z-combinator. -
Avaq revised this gist
Feb 18, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,6 @@ psi | **P** | on | | `(b → b → c) → (a → b) → a fix-point\* | **Y** | fix | | `(a → a) → a` \* In JavaScript and other non-lazy languages, it is impossible to implement the Y-combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is commonly fererred to as the Z-combinator. -
Avaq revised this gist
Feb 18, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,5 @@ fix-point\* | **Y** | fix | | `(a → a) → a` \* In JavaScript and other non-lazy languages, it is impossible to implement the Fix-Point combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator is implemented. This variant is commonly fererred to as the Z-combinator. -
Avaq revised this gist
Feb 18, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,8 @@ flip | **C** | flip | flip | `(a → b → c) → b → a → c` compose | **B** | (.) | compose | `(b → c) → (a → b) → a → c` substitution | **S** | | | `(a → b → c) → (a → b) → a → c` psi | **P** | on | | `(b → b → c) → (a → b) → a → a → c` fix-point\* | **Y** | fix | | `(a → a) → a` \* In JavaScript and other non-lazy languages, it is impossible to implement the Fix-Point combinator. Instead a variant known as the *applicative* or *strict* fix-point combinator, sometimes referred to as the Z-combinator.
NewerOlder