SlideShare uma empresa 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#

Mais conteúdo relacionado

Semelhante 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
 

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

Mais de Rodrigo Vidal

Mais 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

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

F# Functional and MultiCore Programming

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