•

0 likes•16 views

Programmatic and Mathematical definitions of right fold and left fold.

Report

Share

Report

Share

Download to read offline

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

State space design

State space design

State space design

State space design

Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid

Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid

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...

The Impact of PLM Software on Fashion Production

The Impact of PLM Software on Fashion Production

A Guideline to Zendesk to Re:amaze Data Migration

A Guideline to Zendesk to Re:amaze Data Migration

Studiovity film pre-production and screenwriting software

Studiovity film pre-production and screenwriting software

how-to-download-files-safely-from-the-internet.pdf

how-to-download-files-safely-from-the-internet.pdf

OpenChain @ LF Japan Executive Briefing - May 2024

OpenChain @ LF Japan Executive Briefing - May 2024

AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG

AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG

KLARNA - Language Models and Knowledge Graphs: A Systems Approach

KLARNA - Language Models and Knowledge Graphs: A Systems Approach

Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...

Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...

Crafting the Perfect Measurement Sheet with PLM Integration

Crafting the Perfect Measurement Sheet with PLM Integration

JustNaik Solution Deck (stage bus sector)

JustNaik Solution Deck (stage bus sector)

AI Hackathon.pptx

AI Hackathon.pptx

AI/ML Infra Meetup | Perspective on Deep Learning Framework

AI/ML Infra Meetup | Perspective on Deep Learning Framework

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...

5 Reasons Driving Warehouse Management Systems Demand

5 Reasons Driving Warehouse Management Systems Demand

Secure Software Ecosystem Teqnation 2024

Secure Software Ecosystem Teqnation 2024

10 Essential Software Testing Tools You Need to Know About.pdf

10 Essential Software Testing Tools You Need to Know About.pdf

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation

Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)

Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)

A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf

A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf

- 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