SlideShare ist ein Scribd-Unternehmen logo
1 von 77
Downloaden Sie, um offline zu lesen
The Shape
of
Functional
Programming
Saturday, October 5, 13
@fogus
http://www.fogus.me
http://github.com/documentcloud/underscore-contrib
Saturday, October 5, 13
@fogus
“Functional
JavaScript”Lemonad
codd.js
Saturday, October 5, 13
A
program
written in an
object-oriented
style
Saturday, October 5, 13
Functional
programming
for the MEOW!
Saturday, October 5, 13
Saturday, October 5, 13
Pattern 1 - Map(ish)
var array = [0,1,2,3,4,5];
var transformed = [];
 
for (var i = 0; i < array.length; i++) {
transformed.push(array[i] + 100);
}
 
transformed;
//=> [100, 101, 102, 103, 104, 105]
Saturday, October 5, 13
Pattern 1 - Map(ish)
// Underscore
 
_.map(array, function(n) {
return n + 100;
});
 
 
// Lemonad
 
L.map(L.add(100), array);
Saturday, October 5, 13
Pattern 2 - Filter(ish)
var array = [0,1,2,3,4,5];
var keepers = [];
 
for (var i = 0; i < array.length; i++) {
if (array[i] % 2 === 0) {
keepers.push(array[i]);
}
}
 
keepers;
//=> [101, 102, 103, 104, 105]
Saturday, October 5, 13
Pattern 2 - Filter(ish)
// Underscore
 
_.filter(array, function(n) {
if (n % 2 === 0) {
return true;
}
else {
return false;
}
});
 
// Lemonad
 
L.filter(L.isEven, array);
Saturday, October 5, 13
Pattern 3 - Reduce(ish)
var array = [0,1,2,3,4,5];
var sum = 0;
 
for (var i = 0; i < array.length; i++) {
sum += array[i];
}
 
sum;
//=> 15
Saturday, October 5, 13
Pattern 3 - Reduce(ish)
// Underscore
 
_.reduce(array, function(acc, n) {
return acc + n;
}, 0);
 
 
// Lemonad
 
L.reduce(L.uncurry(L.add), 0, array);
Saturday, October 5, 13
APL
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
0 1 0 0 1 0 0 1 0
0 1 0
0 1 0
0 1 0
Saturday, October 5, 13
Fun.js at a glance
• Simple data
• Many small functions
• Larger abstractions built via composition
• OO to supplement (no dogma)
Saturday, October 5, 13
Simple data
Saturday, October 5, 13
“
Saturday, October 5, 13
#
Saturday, October 5, 13
42
Saturday, October 5, 13
?
Saturday, October 5, 13
Saturday, October 5, 13
[ ]
Saturday, October 5, 13
#
Saturday, October 5, 13
#
[1, 2, 3, 4, 5]
Saturday, October 5, 13
Saturday, October 5, 13
{ }
Saturday, October 5, 13
#“
Saturday, October 5, 13
#“
{x: 0, y: 1}
Saturday, October 5, 13
{x: 0, y: 1}
#
Saturday, October 5, 13
Saturday, October 5, 13
*
Saturday, October 5, 13
Small functions
Saturday, October 5, 13
Saturday, October 5, 13
λ
Saturday, October 5, 13
λ
Saturday, October 5, 13
λ
Saturday, October 5, 13
Disclaimer
Saturday, October 5, 13
#
Procedure
Saturday, October 5, 13
#
Procedure
Saturday, October 5, 13
function logNth(array, index) {
console.log(array[index]);
}
logNth([‘a’, ‘b’, ‘c’], 1);
// (console) b
#
Saturday, October 5, 13
Purity
Saturday, October 5, 13
Ostrich Purity
Saturday, October 5, 13
Ostrich Purity
Saturday, October 5, 13
#
Function
Kinda important
Saturday, October 5, 13
function nth(array, index) {
return array[index];
}
nth([‘a’, ‘b’, ‘c’], 1);
//=> ‘b’
#
Saturday, October 5, 13
Saturday, October 5, 13
Saturday, October 5, 13
Saturday, October 5, 13
id name age
555-55-5555 Moe 45
777-77-7777 Curly 47
0
1
Saturday, October 5, 13
var table = [
{id: ‘555-55-5555’,
name: ‘Moe’,
age: 45},
{id: ‘777-77-7777’,
name: ‘Curly’,
age: 47}
];
Saturday, October 5, 13
id name age
555-55-5555 Moe 45
777-77-7777 Curly 47
0
1
Saturday, October 5, 13
#“
Saturday, October 5, 13
function cell(table, col, row){
return table[row][col];
}
cell(table, ‘name’, 0);
//=> ‘Moe’
cell(table, ‘age’, 0);
//=> 45
#“
Saturday, October 5, 13
Larger abstractions
built via composition
Saturday, October 5, 13
L
Clojure, Haskell, ML, Joy, _
Saturday, October 5, 13
Currying, partial
application, fixation, oh
my!
Saturday, October 5, 13
#“
Saturday, October 5, 13
#“
L.fix
Saturday, October 5, 13
#
L.fix(cell, L._, ‘name’, L._);
‘name’
Saturday, October 5, 13
#
L.fix(cell, L._, ‘name’, L._);
var getName = L.fix(cell, L._, ‘name’, L._);
getName(table, 0);
//=> ‘Moe’
getName(table, 1);
//=> ‘Curly’
‘name’
Saturday, October 5, 13
#“
L.rot
Saturday, October 5, 13
#
L.rot(cell);
“
Saturday, October 5, 13
#“
L.partial
Saturday, October 5, 13
L.partial(L.rot(cell), ‘name’);
#‘name’
Saturday, October 5, 13
L.partial(L.rot(cell), ‘name’);
var getName = L.partial(L.rot(cell), ‘name’);
getName(0, table);
//=> ‘Moe’
getName(1, table);
//=> ‘Curly’
#‘name’
Saturday, October 5, 13
L.rcurry
“
Codd.col(table, ‘name’);
//=> [‘Moe’, ‘Curly’]
Saturday, October 5, 13
“
“
L.rcurry2(Codd.col);
Saturday, October 5, 13
“
L.rcurry2(Codd.col);
var valuesFor = L.rcurry2(Codd.col);
var allNames = valuesFor(‘name’);
allNames(table);
//=> [‘Moe’, ‘Curly’]
Saturday, October 5, 13
Compositions and
Pipelines
Saturday, October 5, 13
How to count
all of the values
in a column?
Saturday, October 5, 13
“
function countValues(table, tag) {
return L.len(Codd.col(table, tag));
}
countValues(table, ‘name’);
//=> 2
#
Saturday, October 5, 13
L.comp
return L.len(Codd.col(table, tag));
First thisThen this
Saturday, October 5, 13
“Codd.col
#
L.len
Saturday, October 5, 13
“Codd.col
#
L.len
Saturday, October 5, 13
“
var countValues = L.comp(L.len, Codd.col);
countValues(table, ‘name’);
//=> 2
#
Saturday, October 5, 13
L.pipeline
L.pipeline(table, Codd.col(‘name’), L.len);
//=> 2
First this Then this
Saturday, October 5, 13
codd.js (demo)
Relational Algebra
Saturday, October 5, 13
Thanks
• The NationJS team
• O’Reilly
• Alan Dipert
• Paul Khuong
• The Underscore community
• The Clojure community
Saturday, October 5, 13

Weitere ähnliche Inhalte

Ähnlich wie The Shape of Functional Programming

Mastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireMastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireLuca Bonmassar
 
Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.lrdesign
 
JavaOne 2013 - Clojure for Java Developers
JavaOne 2013 - Clojure for Java DevelopersJavaOne 2013 - Clojure for Java Developers
JavaOne 2013 - Clojure for Java DevelopersJan Kronquist
 
The Not Java That's Not Scala
The Not Java That's Not ScalaThe Not Java That's Not Scala
The Not Java That's Not ScalaJustin Lee
 
Distributed Data Structures
Distributed Data StructuresDistributed Data Structures
Distributed Data StructuresPDX Web & Design
 
D-Talk: What's awesome about Ruby 2.x and Rails 4
D-Talk: What's awesome about Ruby 2.x and Rails 4D-Talk: What's awesome about Ruby 2.x and Rails 4
D-Talk: What's awesome about Ruby 2.x and Rails 4Jan Berdajs
 
Intro to pattern matching in scala
Intro to pattern matching in scalaIntro to pattern matching in scala
Intro to pattern matching in scalaJan Krag
 
Web directions code 13 notes
Web directions code 13 notesWeb directions code 13 notes
Web directions code 13 notesjaredau
 
Seattle.rb 6.4
Seattle.rb 6.4Seattle.rb 6.4
Seattle.rb 6.4deanhudson
 
Property based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesProperty based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesDebasish Ghosh
 
Scala: Simplifying Development
Scala: Simplifying DevelopmentScala: Simplifying Development
Scala: Simplifying Developmentmircodotta
 
OWASP Top 10 2013
OWASP Top 10 2013OWASP Top 10 2013
OWASP Top 10 2013markstory
 
Test driven game development silly, stupid or inspired?
Test driven game development   silly, stupid or inspired?Test driven game development   silly, stupid or inspired?
Test driven game development silly, stupid or inspired?Eric Smith
 

Ähnlich wie The Shape of Functional Programming (18)

Clojure night
Clojure nightClojure night
Clojure night
 
Mastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireMastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and Tire
 
Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.Ruby 2.0 / Rails 4.0, A selection of new features.
Ruby 2.0 / Rails 4.0, A selection of new features.
 
JavaOne 2013 - Clojure for Java Developers
JavaOne 2013 - Clojure for Java DevelopersJavaOne 2013 - Clojure for Java Developers
JavaOne 2013 - Clojure for Java Developers
 
The Not Java That's Not Scala
The Not Java That's Not ScalaThe Not Java That's Not Scala
The Not Java That's Not Scala
 
JavaScript 1.8.5: New Features Explored
JavaScript 1.8.5:  New Features ExploredJavaScript 1.8.5:  New Features Explored
JavaScript 1.8.5: New Features Explored
 
Distributed Data Structures
Distributed Data StructuresDistributed Data Structures
Distributed Data Structures
 
D-Talk: What's awesome about Ruby 2.x and Rails 4
D-Talk: What's awesome about Ruby 2.x and Rails 4D-Talk: What's awesome about Ruby 2.x and Rails 4
D-Talk: What's awesome about Ruby 2.x and Rails 4
 
ES6: Features + Rails
ES6: Features + RailsES6: Features + Rails
ES6: Features + Rails
 
Intro to pattern matching in scala
Intro to pattern matching in scalaIntro to pattern matching in scala
Intro to pattern matching in scala
 
Web directions code 13 notes
Web directions code 13 notesWeb directions code 13 notes
Web directions code 13 notes
 
Programação Funcional
Programação FuncionalProgramação Funcional
Programação Funcional
 
Seattle.rb 6.4
Seattle.rb 6.4Seattle.rb 6.4
Seattle.rb 6.4
 
Property based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesProperty based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rules
 
Meet Couch DB
Meet Couch DBMeet Couch DB
Meet Couch DB
 
Scala: Simplifying Development
Scala: Simplifying DevelopmentScala: Simplifying Development
Scala: Simplifying Development
 
OWASP Top 10 2013
OWASP Top 10 2013OWASP Top 10 2013
OWASP Top 10 2013
 
Test driven game development silly, stupid or inspired?
Test driven game development   silly, stupid or inspired?Test driven game development   silly, stupid or inspired?
Test driven game development silly, stupid or inspired?
 

Mehr von Mike Fogus

The Return of the Living Datalog
The Return of the Living DatalogThe Return of the Living Datalog
The Return of the Living DatalogMike Fogus
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. ExperienceMike Fogus
 
The Magnificent Seven
The Magnificent SevenThe Magnificent Seven
The Magnificent SevenMike Fogus
 
Clojure 1.1 And Beyond
Clojure 1.1 And BeyondClojure 1.1 And Beyond
Clojure 1.1 And BeyondMike Fogus
 

Mehr von Mike Fogus (6)

Confo
ConfoConfo
Confo
 
The Return of the Living Datalog
The Return of the Living DatalogThe Return of the Living Datalog
The Return of the Living Datalog
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
 
The Magnificent Seven
The Magnificent SevenThe Magnificent Seven
The Magnificent Seven
 
Clojure 1.1 And Beyond
Clojure 1.1 And BeyondClojure 1.1 And Beyond
Clojure 1.1 And Beyond
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 

Kürzlich hochgeladen

🐬 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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

The Shape of Functional Programming

Hinweis der Redaktion

  1. just kidding
  2. 1979
  3. boolean
  4. data abstractions, composed from primitive types
  5. data abstractions, composed from primitive types
  6. show cell(table, r, c)