SlideShare una empresa de Scribd logo
1 de 34
F#nctional and MultiCore
Programming
Rodrigo Vidal
Quem sou eu?
Rodrigo Vidal
Twitter: @rodrigovidal
Blog: www.rodrigovidal.net
•Focado em Arquitetura de Software e Boas Práticas.
•Agilista e entusiasta de F# e IronRuby/Ruby.
•Membro ativo do grupo .NetArchitects
•Professional Scrum Developer
•Presente no maiores eventos do tecnologia do país.
Agenda
• MultiCore
• Functional Paradigm
• F# Language
Functional Programming
• Velho Paradigma
• 52 anos hoje
• Ignorado pelo MainStream até agora
Functional – Why now?
• Novo desafios
• Processar grandes quantidades de dados
• Escalabilidade para Cores e Clusters
• Declarative Programming
Why another language?
• Programação Funcional está por ai a um
longo tempo.
– Não é algo novo
– Tem uma longa história
• Programação Funcional é “safe”
– Devemos nos preocupar principalmente
quando lidamos com aplicações MultiCore e
de Cloud Computing
• Programção Funcional está crescendo!
“What” rather than “How”
Imperativo Vs. Declarativo
Quem usa ForEach() ?
|
List<string> res = new List<string>();
foreach(Product p in Products) {
    if (p.UnitPrice > 75.0M) {
        res.Add(String.Format("{0} - ${1}",
        p.ProductName, p.UnitPrice)); 
    }
}
var res = from p in Products
where p.UnitPrice > 75.0M
select string.Format("{0} - ${1}",
p.ProductName, p.UnitPrice);
return res;
Domain Driven Design
Foco no Core Domain, revelando a
intenção do seu código.
Interfaces Reveladoras de Intenções
Concurrency-Friendly
Imperative-Problems:
•É dificil tornar codigo sequencial em
paralelo.
•É dificil usar “Shared States” e “Locks”
The Functional Paradigm
• Immutable Data
• Ability to compose functions
• Functions can be thread as data
• Lazy Evalution
• Pattern Matching
Immutability
“Values are immutable by default”
Side-Effects
– Also knowed as “The Butterfly Effect”
• A side effect
– Modifies some state
– Has observable interaction with calling functions
– Has observable interaction with the outside world
– Example: a function or method with no return value
Composing Functions
f(x) = 3x+2
g(y) = 4y-1
g(f(2)) = ?
f(x)
g(x)
Motivação
#Inception
Language Evolution
http://channel9.msdn.com/posts/Charles/Simon-Peyton-Jones-Towards-a-Programming-Language-Nirvana/
C#, VB, Java, C are
imperative
programming
languages. Very
useful but can
change the state of
the world at anytime
creating side effects.
Nirvana!
Useful and
Safe
Haskell is Very Safe, but
not very useful. Used
heavily in research and
academia, but rarely in
business.
F#F#
F# Evolution
What is F#?
• Functional language developed by
Microsoft Research
– By Don Syme and his team, who
productized Generics
– Based on OCaml (influenced by C# and
Haskell)
F# 1.0
Functional + Objects + .NET
F# 2.0
Functional + Objects + .NET +
Async + Parallel + Interactive +
Scripting
F# 2.0
Functional + Objects + .NET +
Async + Parallel + Interactive +
Scripting
F# 2.0
• Succinct, Expressive, Functional
– Productive, simple, powerful, and fun language
• Parallel, Explorative, Data-rich, Algorithmic
– Extends the .NET platform to important new audiences
• Innovative, Industry/Platform-Leading
– Async, parallel, easy-objects, immutability, tuples, units-
of-measure
• Note: F# is not a replacement for C#/VB/C++
– Complementary, interoperable and augments and builds
on .NET as multi-lang platform
let demo = “Code!”
Let’s Go Parallel
The Free Lunch is Over
Why not 10GHz?
Software
Matrix Revolution
Parallel
Pattern
Library
Resource Manager
Task Scheduler
Task Parallel Library
Parallel LINQ
Threads
Native Concurrency Runtime
Managed Libraries
ThreadPool DataStructures
DataStructures
Tools
Async
Agents
Library
UMS Threads
Microsoft
Research
Visual
Studio 2010
Parallel
Debugger
Windows
Profiler
Concurrency
Analysis
Race
Detection
Fuzzing
AxumVisual F#
Managed Languages
Rx
Native Libraries
Managed Concurrency Runtime
DryadLINQ
Research /
Incubation
Research /
Incubation
Visual Studio 2010 / .NET 4 Windows 7 / Server 2008 R2
HPC Server
Operating
System
Parallel Computing and PDC09
Imperative Parallelism
Declarative Data Parallelism
CODE!
Amdahl’s Law (1 / percent of time spent in
sequential processing)
Limits of Parallelism
GPU – Beyond CPU
CODE!
The F#ture
Latest Books about F#

Más contenido relacionado

Similar a F# Functional and MultiCore Programming

F# Ignite - DNAD2010
F# Ignite - DNAD2010F# Ignite - DNAD2010
F# Ignite - DNAD2010Rodrigo Vidal
 
Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation pptArt Scott
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181Mahmoud Samir Fayed
 
Object oriented slides
Object oriented slidesObject oriented slides
Object oriented slidesahad nadeem
 
"The F# Path to Relaxation", Don Syme
"The F# Path to Relaxation", Don Syme"The F# Path to Relaxation", Don Syme
"The F# Path to Relaxation", Don SymeFwdays
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem Claudson Oliveira
 
The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31Mahmoud Samir Fayed
 
Open Source .NET
Open Source .NETOpen Source .NET
Open Source .NETOnyxfish
 
The Ring programming language version 1.10 book - Part 6 of 212
The Ring programming language version 1.10 book - Part 6 of 212The Ring programming language version 1.10 book - Part 6 of 212
The Ring programming language version 1.10 book - Part 6 of 212Mahmoud Samir Fayed
 
Ten compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkTen compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkJanBask Training
 
The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210Mahmoud Samir Fayed
 
Top 10 Programming Languages 2023.docx
Top 10 Programming Languages 2023.docxTop 10 Programming Languages 2023.docx
Top 10 Programming Languages 2023.docxAdvance Tech
 
The Ring programming language version 1.8 book - Part 6 of 202
The Ring programming language version 1.8 book - Part 6 of 202The Ring programming language version 1.8 book - Part 6 of 202
The Ring programming language version 1.8 book - Part 6 of 202Mahmoud Samir Fayed
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...Embarcadero Technologies
 

Similar a F# Functional and MultiCore Programming (20)

F# Ignite - DNAD2010
F# Ignite - DNAD2010F# Ignite - DNAD2010
F# Ignite - DNAD2010
 
Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation ppt
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181
 
Object oriented slides
Object oriented slidesObject oriented slides
Object oriented slides
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
"The F# Path to Relaxation", Don Syme
"The F# Path to Relaxation", Don Syme"The F# Path to Relaxation", Don Syme
"The F# Path to Relaxation", Don Syme
 
C# handout.docx
C# handout.docxC# handout.docx
C# handout.docx
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem
 
The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31
 
Open Source .NET
Open Source .NETOpen Source .NET
Open Source .NET
 
The Ring programming language version 1.10 book - Part 6 of 212
The Ring programming language version 1.10 book - Part 6 of 212The Ring programming language version 1.10 book - Part 6 of 212
The Ring programming language version 1.10 book - Part 6 of 212
 
Ten compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkTen compelling reasons to learn .net framework
Ten compelling reasons to learn .net framework
 
The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30
 
C#.pptx
C#.pptxC#.pptx
C#.pptx
 
The Poly Pinoy
The Poly PinoyThe Poly Pinoy
The Poly Pinoy
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210
 
Top 10 Programming Languages 2023.docx
Top 10 Programming Languages 2023.docxTop 10 Programming Languages 2023.docx
Top 10 Programming Languages 2023.docx
 
The Ring programming language version 1.8 book - Part 6 of 202
The Ring programming language version 1.8 book - Part 6 of 202The Ring programming language version 1.8 book - Part 6 of 202
The Ring programming language version 1.8 book - Part 6 of 202
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
 

Más de Rodrigo Vidal

Más de Rodrigo Vidal (7)

Fij
FijFij
Fij
 
F#3.0
F#3.0 F#3.0
F#3.0
 
Monadic Design
Monadic DesignMonadic Design
Monadic Design
 
C5, vb11, f3
C5, vb11, f3C5, vb11, f3
C5, vb11, f3
 
DevDay BH 2011 Programação Funcional
DevDay BH 2011 Programação FuncionalDevDay BH 2011 Programação Funcional
DevDay BH 2011 Programação Funcional
 
WebCamps Software Testing
WebCamps Software TestingWebCamps Software Testing
WebCamps Software Testing
 
Computacao em nuvem windows azure
Computacao em nuvem   windows azureComputacao em nuvem   windows azure
Computacao em nuvem windows azure
 

Último

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

F# Functional and MultiCore Programming

Notas del editor

  1. List&amp;lt;string&amp;gt; res = new List&amp;lt;string&amp;gt;(); #1 foreach(Product p in Products) { #2 if (p.UnitPrice &amp;gt; 75.0M) { res.Add(String.Format(&amp;quot;{0} - ${1}&amp;quot;, p.ProductName, p.UnitPrice)); #3 } } var res = from p in Products where p.UnitPrice &amp;gt; 75.0M #1 select string.Format(&amp;quot;{0} - ${1}&amp;quot;, p.ProductName, p.UnitPrice); #2 return res;
  2. C# Parallel.For(1,inp.Length-1,i =&amp;gt; { var sum = inp[i-1] + inp[i] + inp[i+1]; res[i] = sum / 3; }); F# let pfor nfrom nto f = Parallel.For(nfrom, nto + 1, Action&amp;lt;_&amp;gt;(f)) pfor 1 (inp.Length-2) (fun i -&amp;gt; let sum = inp.[i-1] + inp.[i] + inp.[i+1] res.[i] &amp;lt;- sum / 3 )
  3. The key idea behind the declarative style of programming is that the code doesn&amp;apos;t specify how exactly it should be executed. Execution is provided by a minimal number of primitives such as select and where in LINQ or map and filter in F#, and these primitives can behave in a sophisticated way.
  4. The key idea behind the declarative style of programming is that the code doesn&amp;apos;t specify how exactly it should be executed. Execution is provided by a minimal number of primitives such as select and where in LINQ or map and filter in F#, and these primitives can behave in a sophisticated way.
  5. The key idea behind the declarative style of programming is that the code doesn&amp;apos;t specify how exactly it should be executed. Execution is provided by a minimal number of primitives such as select and where in LINQ or map and filter in F#, and these primitives can behave in a sophisticated way.
  6. The key idea behind the declarative style of programming is that the code doesn&amp;apos;t specify how exactly it should be executed. Execution is provided by a minimal number of primitives such as select and where in LINQ or map and filter in F#, and these primitives can behave in a sophisticated way.