Soumettre la recherche
Mettre en ligne
Folding Cheat Sheet #2 - second in a series
•
0 j'aime
•
15 vues
Philip Schwarz
Suivre
Programmatic and Mathematical definitions of right fold and left fold.
Lire moins
Lire la suite
Logiciels
Signaler
Partager
Signaler
Partager
1 sur 4
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Left and Right Folds- Comparison of a mathematical definition and a programm...
Left and Right Folds- Comparison of a mathematical definition and a programm...
Philip Schwarz
Left and Right Folds- Comparison of a mathematical definition and a programm...
Left and Right Folds- Comparison of a mathematical definition and a programm...
Philip Schwarz
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
Yosia Adi Setiawan
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
Yosia Adi Setiawan
Sets
Sets
Fightgood Allmyheart
Sets
Sets
Fightgood Allmyheart
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
Yosia Adi Setiawan
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
Yosia Adi Setiawan
Recommandé
Left and Right Folds- Comparison of a mathematical definition and a programm...
Left and Right Folds- Comparison of a mathematical definition and a programm...
Philip Schwarz
Left and Right Folds- Comparison of a mathematical definition and a programm...
Left and Right Folds- Comparison of a mathematical definition and a programm...
Philip Schwarz
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
Yosia Adi Setiawan
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 8 Rombel 3
Yosia Adi Setiawan
Sets
Sets
Fightgood Allmyheart
Sets
Sets
Fightgood Allmyheart
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
Yosia Adi Setiawan
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 7 Rombel 3
Yosia Adi Setiawan
Backpropagation
Backpropagation
강민국 강민국
Backpropagation
Backpropagation
강민국 강민국
Ley de composición interna algebra ii
Ley de composición interna algebra ii
Wilber Acharte Prado
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Yosia Adi Setiawan
Ley de composición interna algebra ii
Ley de composición interna algebra ii
Wilber Acharte Prado
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Yosia Adi Setiawan
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
bisma samudra
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
bisma samudra
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Μάκης Χατζόπουλος
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Μάκης Χατζόπουλος
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Demetrio Ccesa Rayme
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Demetrio Ccesa Rayme
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
tungwc
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
tungwc
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
erick rodriguez
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
erick rodriguez
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
SEMINARGROOT
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
SEMINARGROOT
Relativity
Relativity
edgardoangeles1
Relativity
Relativity
edgardoangeles1
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Philip Schwarz
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a series
Philip Schwarz
Contenu connexe
Similaire à Folding Cheat Sheet #2 - second in a series
Backpropagation
Backpropagation
강민국 강민국
Backpropagation
Backpropagation
강민국 강민국
Ley de composición interna algebra ii
Ley de composición interna algebra ii
Wilber Acharte Prado
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Yosia Adi Setiawan
Ley de composición interna algebra ii
Ley de composición interna algebra ii
Wilber Acharte Prado
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Yosia Adi Setiawan
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
bisma samudra
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
bisma samudra
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Μάκης Χατζόπουλος
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Μάκης Χατζόπουλος
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Demetrio Ccesa Rayme
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Demetrio Ccesa Rayme
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
tungwc
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
tungwc
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
erick rodriguez
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
erick rodriguez
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
SEMINARGROOT
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
SEMINARGROOT
Relativity
Relativity
edgardoangeles1
Relativity
Relativity
edgardoangeles1
Similaire à Folding Cheat Sheet #2 - second in a series
(20)
Backpropagation
Backpropagation
Backpropagation
Backpropagation
Ley de composición interna algebra ii
Ley de composición interna algebra ii
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Ley de composición interna algebra ii
Ley de composición interna algebra ii
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
2018 Geometri Transformasi Perkalian 5 Isometri Kelompok 1 Rombel 3
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Θεωρία - Ορισμοί - Προτάσεις 2021 - Γ Λυκείου
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
Semana 24 funciones iv álgebra uni ccesa007
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
SUEC 高中 Adv Maths (Permutation) (Part 1).pptx
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
TABLA CENTROIDE .pdf
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
Differential Geometry for Machine Learning
Relativity
Relativity
Relativity
Relativity
Plus de Philip Schwarz
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Philip Schwarz
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a series
Philip Schwarz
Folding Cheat Sheet #1 - first in a series
Folding Cheat Sheet #1 - first in a series
Philip Schwarz
Scala Left Fold Parallelisation- Three Approaches
Scala Left Fold Parallelisation- Three Approaches
Philip Schwarz
Tagless Final Encoding - Algebras and Interpreters and also Programs
Tagless Final Encoding - Algebras and Interpreters and also Programs
Philip Schwarz
Fusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with Views
Philip Schwarz
A sighting of traverse_ function in Practical FP in Scala
A sighting of traverse_ function in Practical FP in Scala
Philip Schwarz
A sighting of traverseFilter and foldMap in Practical FP in Scala
A sighting of traverseFilter and foldMap in Practical FP in Scala
Philip Schwarz
A sighting of sequence function in Practical FP in Scala
A sighting of sequence function in Practical FP in Scala
Philip Schwarz
N-Queens Combinatorial Puzzle meets Cats
N-Queens Combinatorial Puzzle meets Cats
Philip Schwarz
Kleisli composition, flatMap, join, map, unit - implementation and interrelat...
Kleisli composition, flatMap, join, map, unit - implementation and interrelat...
Philip Schwarz
The aggregate function - from sequential and parallel folds to parallel aggre...
The aggregate function - from sequential and parallel folds to parallel aggre...
Philip Schwarz
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Philip Schwarz
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Philip Schwarz
The Sieve of Eratosthenes - Part II - Genuine versus Unfaithful Sieve - Haske...
The Sieve of Eratosthenes - Part II - Genuine versus Unfaithful Sieve - Haske...
Philip Schwarz
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Ha...
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Ha...
Philip Schwarz
Algebraic Data Types forData Oriented Programming - From Haskell and Scala t...
Algebraic Data Types forData Oriented Programming - From Haskell and Scala t...
Philip Schwarz
Jordan Peterson - The pursuit of meaning and related ethical axioms
Jordan Peterson - The pursuit of meaning and related ethical axioms
Philip Schwarz
Defining filter using (a) recursion (b) folding (c) folding with S, B and I c...
Defining filter using (a) recursion (b) folding (c) folding with S, B and I c...
Philip Schwarz
Defining filter using (a) recursion (b) folding with S, B and I combinators (...
Defining filter using (a) recursion (b) folding with S, B and I combinators (...
Philip Schwarz
Plus de Philip Schwarz
(20)
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #1 - first in a series
Folding Cheat Sheet #1 - first in a series
Scala Left Fold Parallelisation- Three Approaches
Scala Left Fold Parallelisation- Three Approaches
Tagless Final Encoding - Algebras and Interpreters and also Programs
Tagless Final Encoding - Algebras and Interpreters and also Programs
Fusing Transformations of Strict Scala Collections with Views
Fusing Transformations of Strict Scala Collections with Views
A sighting of traverse_ function in Practical FP in Scala
A sighting of traverse_ function in Practical FP in Scala
A sighting of traverseFilter and foldMap in Practical FP in Scala
A sighting of traverseFilter and foldMap in Practical FP in Scala
A sighting of sequence function in Practical FP in Scala
A sighting of sequence function in Practical FP in Scala
N-Queens Combinatorial Puzzle meets Cats
N-Queens Combinatorial Puzzle meets Cats
Kleisli composition, flatMap, join, map, unit - implementation and interrelat...
Kleisli composition, flatMap, join, map, unit - implementation and interrelat...
The aggregate function - from sequential and parallel folds to parallel aggre...
The aggregate function - from sequential and parallel folds to parallel aggre...
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an example
The Sieve of Eratosthenes - Part II - Genuine versus Unfaithful Sieve - Haske...
The Sieve of Eratosthenes - Part II - Genuine versus Unfaithful Sieve - Haske...
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Ha...
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Ha...
Algebraic Data Types forData Oriented Programming - From Haskell and Scala t...
Algebraic Data Types forData Oriented Programming - From Haskell and Scala t...
Jordan Peterson - The pursuit of meaning and related ethical axioms
Jordan Peterson - The pursuit of meaning and related ethical axioms
Defining filter using (a) recursion (b) folding (c) folding with S, B and I c...
Defining filter using (a) recursion (b) folding (c) folding with S, B and I c...
Defining filter using (a) recursion (b) folding with S, B and I combinators (...
Defining filter using (a) recursion (b) folding with S, B and I combinators (...
Dernier
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Ortus Solutions, Corp
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
kellynguyen01
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
aditisharan08
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
Frank van der Linden
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ComplianceQuest1
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ICS
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
MyIntelliSource, Inc.
What is Binary Language? Computer Number Systems
What is Binary Language? Computer Number Systems
JheuzeDellosa
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
stazi3110
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
kalichargn70th171
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
VICTOR MAESTRE RAMIREZ
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Alberto González Trastoy
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
gurkirankumar98700
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
Christina Lin
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
kotipi9215
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
aagamshah0812
Asset Management Software - Infographic
Asset Management Software - Infographic
Hr365.us smith
Dernier
(20)
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
What is Binary Language? Computer Number Systems
What is Binary Language? Computer Number Systems
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
Asset Management Software - Infographic
Asset Management Software - Infographic
Folding Cheat Sheet #2 - second in a series
1.
CHEAT-SHEET Folding #2 ∶ / 𝒂𝟎 ∶ /
𝒂𝟏 ∶ / 𝒂𝟐 ∶ / 𝒂𝟑 𝒇 / 𝒂𝟎 𝒇 / 𝒂𝟏 𝒇 / 𝒂𝟐 𝒇 / 𝒂𝟑 𝒆 @philip_schwarz slides by https://fpilluminated.com/
2.
∶ / 𝑎0 ∶ /
𝑎1 ∶ / 𝑎2 ∶ / 𝑎3 𝑓 / 𝑓 𝑎3 / 𝑓 𝑎2 / 𝑓 𝑎1 / 𝑏 𝑎0 𝑓 / 𝑎0 𝑓 / 𝑎1 𝑓 / 𝑎2 𝑓 / 𝑎3 𝑏 𝑎0: (𝑎1: 𝑎2: 𝑎3: ) 𝑓 𝑓 𝑓 𝑓 𝑏 𝑎0 𝑎1 𝑎2 𝑎3 var 𝑎𝑐𝑐 = 𝑏 foreach(𝑎 in 𝑎𝑠) 𝑎𝑐𝑐 = 𝑓(𝑎𝑐𝑐, 𝑎) return 𝑎𝑐𝑐 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 𝑎𝑠 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑏 𝑎𝑠 𝑎𝑠 = [𝑎0, 𝑎1, 𝑎2, 𝑎3] 𝑓𝑜𝑙𝑑𝑟 ∷ 𝛼 → 𝛽 → 𝛽 → 𝛽 → 𝛼 → 𝛽 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 = 𝑏 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 𝑥: 𝑥𝑠 = 𝑓 𝑥 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 𝑥𝑠 𝑓𝑜𝑙𝑑𝑙 ∷ 𝛽 → 𝛼 → 𝛽 → 𝛽 → 𝛼 → 𝛽 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑏 = 𝑏 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑏 𝑥: 𝑥𝑠 = 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑓 𝑏 𝑥 𝑥𝑠 𝑟𝑒𝑝𝑙𝑎𝑐𝑒: ∶ 𝑤𝑖𝑡ℎ 𝑓 𝑤𝑖𝑡ℎ 𝑏 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 [𝑎0, 𝑎1, 𝑎2, 𝑎3] 𝑓 𝑎0 𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 [𝑎1, 𝑎2, 𝑎3] 𝑓 𝑎0 (𝑓 𝑎1 (𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 [𝑎2, 𝑎3])) 𝑓 𝑎0 (𝑓 𝑎1 (𝑓 𝑎2 (𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 [𝑎3]))) 𝑓 𝑎0 (𝑓 𝑎1 (𝑓 𝑎2 (𝑓 𝑎3 (𝑓𝑜𝑙𝑑𝑟 𝑓 𝑏 [ ])))) 𝑓 𝑎0 (𝑓 𝑎1 (𝑓 𝑎2 (𝑓 𝑎3 𝑏))) 𝑓 𝑎0 (𝑓 𝑎1 (𝑓 𝑎2 (𝑓 𝑎3 𝑏))) 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑏 [𝑎0, 𝑎1, 𝑎2, 𝑎3] 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑓 𝑏 𝑎0 [𝑎1, 𝑎2, 𝑎3] 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑓 𝑓 𝑏 𝑎0 𝑎1 [𝑎2, 𝑎3] 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑓 𝑓 𝑓 𝑏 𝑎0 𝑎1 𝑎2 [𝑎3] 𝑓𝑜𝑙𝑑𝑙 𝑓 𝑓 𝑓 𝑓 𝑓 𝑏 𝑎0 𝑎1 𝑎2 𝑎3 [ ] 𝑓 𝑓 𝑓 𝑓 𝑏 𝑎0 𝑎1 𝑎2 𝑎3 Programmatic definition of right fold and left fold 𝑓𝑜𝑙𝑑𝑟 associates 𝑓 from the right 𝑓𝑜𝑙𝑑𝑙 associates 𝑓 from the left
3.
∶ / 𝑎0 ∶ /
𝑎1 ∶ / 𝑎2 ∶ / 𝑎3 𝑓 / 𝑓 𝑎3 / 𝑓 𝑎2 / 𝑓 𝑎1 / 𝑏 𝑎0 𝑓 / 𝑎0 𝑓 / 𝑎1 𝑓 / 𝑎2 𝑓 / 𝑎3 𝑏 𝑎0: (𝑎1: 𝑎2: 𝑎3: ) 𝑓(𝑓 𝑓 𝑓 𝑏, 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3) 𝑓𝑜𝑙𝑑𝑟 𝑎𝑠 𝑓𝑜𝑙𝑑𝑙 𝑎𝑠 𝑎𝑠 = [𝑎0, 𝑎1, 𝑎2, 𝑎3] 𝑓(𝑎0, 𝑓(𝑎1, 𝑓(𝑎2, 𝑓(𝑎3, 𝑏)))) 𝑓𝑜𝑙𝑑𝑙 = 𝑏; 𝑓𝑜𝑙𝑑𝑙 𝑥𝑠 ⧺ [𝑥] = 𝑓(𝑓𝑜𝑙𝑑𝑙 𝑥𝑠 , 𝑥) 𝑓𝑜𝑙𝑑𝑟 = 𝑏; 𝑓𝑜𝑙𝑑𝑟 𝑥 ⧺ 𝑥𝑠 = 𝑓(𝑥, 𝑓𝑜𝑙𝑑𝑟(𝑥𝑠)) 𝑓𝑜𝑙𝑑𝑙 𝑎0, 𝑎1, 𝑎2, 𝑎3 , 𝑓 𝑓𝑜𝑙𝑑𝑙 𝑎0, 𝑎1, 𝑎2 , 𝑎3 𝑓(𝑓(𝑓𝑜𝑙𝑑𝑙 [𝑎0, 𝑎1] , 𝑎2), 𝑎3) 𝑓 𝑓 𝑓 𝑓𝑜𝑙𝑑𝑙 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3 𝑓 𝑓 𝑓 𝑓 𝑓𝑜𝑙𝑑𝑙 [ ] , 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3 𝑓 𝑓 𝑓 𝑓 𝑏, 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3 𝑓𝑜𝑙𝑑𝑟([𝑎0, 𝑎1, 𝑎2, 𝑎3]) 𝑓(𝑎0, 𝑓𝑜𝑙𝑑𝑟([𝑎1, 𝑎2, 𝑎3])) 𝑓(𝑎0, 𝑓(𝑎1, 𝑓𝑜𝑙𝑑𝑟([𝑎2, 𝑎3]))) 𝑓(𝑎0, 𝑓(𝑎1, 𝑓(𝑎2, 𝑓𝑜𝑙𝑑𝑟([𝑎3])))) 𝑓(𝑎0, 𝑓(𝑎1, 𝑓(𝑎2, 𝑓(𝑎3, 𝑓𝑜𝑙𝑑𝑟([]))))) 𝑓(𝑎0, 𝑓(𝑎1, 𝑓(𝑎2, 𝑓(𝑎3, 𝑏)))) Mathematical definition of right fold and left fold 𝑓𝑜𝑙𝑑𝑟 associates 𝑓 from the right 𝑓𝑜𝑙𝑑𝑙 associates 𝑓 from the left 𝑥 = the Birst element 𝑥s = all but the Birst element 𝑥 = the last element 𝑥𝑠 = all but the last element
4.
https://fpilluminated.com/ based on
Télécharger maintenant