SlideShare a Scribd company logo
Porque aprender haskell
me fez um programador
    python melhor?


        @gustavopinto
   gustavo@entropie.com.br
Porque aprender haskell
me fez um programador
    python melhor?
     Baseado em fatos reais


        @gustavopinto
   gustavo@entropie.com.br
Gustavo Pinto

2004   -   belém, grad, php, sh
2006   -   amazontic, java, xp
2008   -   curitiba, msc, python
2009   -   aprioriti, xp, scrum
2011   -   recife, phd, haskell
2012   -   entropie, lean, scala
Belém
Belém
Belém
Belém
Belém
Belém
DISCLAIMER
Não tem código
Não tem código
¬¬''
Mentira, tem mas é
pouquinho :-)
1912 ~ 1954
1912 ~ 1954
   1936
1912 ~ 1954
   1936
ON COMPUTABLE
NUMBERS, WITH
AN APPLICATION
    TO THE
ENTSCHEIDUNGS
   PROBLEM
ON COMPUTABLE
NUMBERS, WITH
AN APPLICATION
    TO THE
ENTSCHEIDUNGS
   PROBLEM
ON COMPUTABLE
NUMBERS, WITH
AN APPLICATION
    TO THE
   DECISION
   PROBLEM
1903 ~1995
1903 ~1995
   1936
1903 ~1995
   1936
AN UNSOLVABLE
 PROBLEM OF
 ELEMENTARY
    NUMBER
    THEORY
1936
1936
Church-Turing thesis
Church-Turing thesis
Church-Turing thesis


         Equivalentes
Algumas features:

● Pure functions
● Functions as first-class objects
● No side effects
Algumas features:

● Pure functions
● Functions as first-class objects
● No side effects
                    Concurrency
                    Friendly
Great.. But, what
about Python??
Python functional
Is python functional?
Is python functional?
I have never considered Python to be
       heavily influenced by functional
 languages, no matter what people say or
    think. I was much more familiar with
    imperative languages such as C and
      Algol 68 and although I had made
 functions first-class objects, I didn't view
    Python as a functional programming
   language. However, earlier on, it was
 clear that users wanted to do much more
           with lists and functions.

http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
I have never considered Python to be
       heavily influenced by functional
 languages, no matter what people say or
    think. I was much more familiar with
    imperative languages such as C and
      Algol 68 and although I had made
 functions first-class objects, I didn't view
    Python as a functional programming
   language. However, earlier on, it was
 clear that users wanted to do much more
           with lists and functions.

http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
I have never considered Python to be
       heavily influenced by functional
 languages, no matter what people say or
    think. I was much more familiar with
    imperative languages such as C and
      Algol 68 and although I had made
 functions first-class objects, I didn't view
    Python as a functional programming
   language. However, earlier on, it was
 clear that users wanted to do much more
           with lists and functions.

http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
I have never considered Python to be
       heavily influenced by functional
 languages, no matter what people say or
    think. I was much more familiar with
    imperative languages such as C and
      Algol 68 and although I had made
 functions first-class objects, I didn't view
    Python as a functional programming
   language. However, earlier on, it was
 clear that users wanted to do much more
           with lists and functions.

http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
I see list and
   functions
if god exists:
                atepassar**2
hack, hack
search_list = lambda l,e : [ [ idx for idx,
 element in enumerate(l) if element ==
    element_f ] for element_f in e]
search_list = lambda l,e : [ [ idx for idx,
 element in enumerate(l) if element ==
    element_f ] for element_f in e]
List comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is


  The part before the pipe is called the output
  function, x is the variable, N is the input set and
  x <= 10 is the predicate. That means that the
  set contains the doubles of all natural numbers
  that satisfy the predicate.
http://learnyouahaskell.com/starting-out#im-a-list-comprehension
List comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is


  The part before the pipe is called the output
  function, x is the variable, N is the input set and
  x <= 10 is the predicate. That means that the
  set contains the doubles of all natural numbers
  that satisfy the predicate.
http://learnyouahaskell.com/starting-out#im-a-list-comprehension
List comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is




  >>> [i for x in range (0, 100) if x > 10]




http://learnyouahaskell.com/starting-out#im-a-list-comprehension
List comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is




  >>> [i for x in range (0, 100) if x > 10]
  >>> [[row[i] for row in matrix] for i in range(4)]


http://learnyouahaskell.com/starting-out#im-a-list-comprehension
List comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is




  >>> [i for x in range (0, 100) if x > 10]
  >>> [[row[i] for row in matrix] for i in range(4)]
  >>> dict([(i, chr(65+i)) for i in range(4)])

http://learnyouahaskell.com/starting-out#im-a-list-comprehension
List          Sou foda
                       comprehension
  A basic comprehension for a set that contains
  the first ten even natural numbers is




  >>> [i for x in range (0, 100) if x > 10]
  >>> [[row[i] for row in matrix] for i in range(4)]
  >>> dict([(i, chr(65+i)) for i in range(4)])

http://learnyouahaskell.com/starting-out#im-a-list-comprehension
search_list = lambda l,e : [ [ idx for idx,
 element in enumerate(l) if element ==
    element_f ] for element_f in e]
Lambda
   Lambdas are basically anonymous functions
   that are used because we need some functions
   only once. Normally, we make a lambda with
   the sole purpose of passing it to a higher-order
   function.




http://learnyouahaskell.com/higher-order-functions#lambdas
Lambda
   Lambdas are basically anonymous functions
   that are used because we need some functions
   only once. Normally, we make a lambda with
   the sole purpose of passing it to a higher-order
   function.




http://learnyouahaskell.com/higher-order-functions#lambdas
Lambda
   >>> lambda x: x % 2




http://learnyouahaskell.com/higher-order-functions#lambdas
Lambda
   >>> is_even = lambda x: x % 2




http://learnyouahaskell.com/higher-order-functions#lambdas
Lambda
   >>> is_even = lambda x: x % 2
   >>> is_even
   <function <lambda> at 0x2a3d050>




http://learnyouahaskell.com/higher-order-functions#lambdas
search_list = lambda l,e : [ [ idx for idx,
 element in enumerate(l) if element ==
    element_f ] for element_f in e]
Built-in Functions
>>> for mes in enumerate (['jan', 'fev', 'mar']):
...        print mes
(0, 'jan')
(1, 'fev')
(2, 'mar')
Built-in Functions
>>> for mes in enumerate (['jan', 'fev', 'mar']):
...        print mes
(0, 'jan')
(1, 'fev')
(2, 'mar')

outras built-in functions:
  ● filter
  ● map
  ● reduce
Built-in Functions
>>> for mes in enumerate (['jan', 'fev', 'mar']):
...        print mes
(0, 'jan')
(1, 'fev')
(2, 'mar')

outras built-in functions:
  ● filter
  ● map                       Funções de
  ● reduce                    alta ordem
Filter
filter(...)
    filter(function or None, sequence) -> list,
tuple or string

   Return those items of sequence for which
function(item) is true. [....]

>>> filter(lambda x: x % 2 == 0, range(10))
Filter
filter(...)
    filter(function or None, sequence) -> list,
tuple or string

   Return those items of sequence for which
function(item) is true. [....]

>>> is_even = lambda x: x % 2 == 0
>>> filter(is_even, range(10))
Map
map(...)
  map(function, sequence[, sequence, ...]) -> list

   Return a list of the results of applying the
function to the items of the argument sequence
(s). [....]

>>> map(lambda s: s.upper(), ['a', 'b', 'c'])
Reduce
reduce(...)
   reduce(function, sequence[, initial]) -> value

    Apply a function of two arguments
cumulatively to the items of a sequence, from
left to right, so as to reduce the sequence to a
single value. [....]

>>> reduce(lambda x,y: x * y, range(1, 4))
>>> reduce(lambda x, y: x + y, ['a', 'b', 'c', 'd'])
Sua High Order Function
def f(x):
  return x + 1

def g(function, x):
  return function(x) + function (x + 1)

print g(f, 1)
Sua High Order Function
def f(x):
  return x + 1                            not bad

def g(function, x):
  return function(x) + function (x + 1)

print g(f, 1)
Porque aprender haskell
me fez um programador
    python melhor?
Consegui
entender
melhor o
código do
 Marcel!
Consegui
entender
melhor o
 código
de outras
pessoas!
Consegui
  entender
   melhor
  a minha
linguagem!
Consegui
  entender
   melhor
   o meu
framework!
Resumindo
Domine sua
linguagem
Evolua com a
sua linguagem
Domine outras
 linguagens
 (Tanto quanto)
Entenda que
linguagens são
    escolhas
Seja o principal
crítico das suas
    escolhas
Para saber mais:
from functional import *
OBRIGADO!

  @gustavopinto
  gustavo@entropie.com.br

More Related Content

What's hot

The Next Great Functional Programming Language
The Next Great Functional Programming LanguageThe Next Great Functional Programming Language
The Next Great Functional Programming Language
John De Goes
 
Quark: A Purely-Functional Scala DSL for Data Processing & Analytics
Quark: A Purely-Functional Scala DSL for Data Processing & AnalyticsQuark: A Purely-Functional Scala DSL for Data Processing & Analytics
Quark: A Purely-Functional Scala DSL for Data Processing & Analytics
John De Goes
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambda
Ivar Østhus
 
Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...
Piotr Paradziński
 
Contravariant functors in scala
Contravariant functors in scalaContravariant functors in scala
Contravariant functors in scala
Piotr Paradziński
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
Saraswathi Murugan
 
Extensible Effects in Dotty
Extensible Effects in DottyExtensible Effects in Dotty
Extensible Effects in Dotty
Sanshiro Yoshida
 
Python advance
Python advancePython advance
Python advance
Deepak Chandella
 
Functor, Apply, Applicative And Monad
Functor, Apply, Applicative And MonadFunctor, Apply, Applicative And Monad
Functor, Apply, Applicative And Monad
Oliver Daff
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmer
David Muñoz Díaz
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Henri Tremblay
 
L4 functions
L4 functionsL4 functions
L4 functions
mondalakash2012
 
Functional Programming in Java 8 - Exploiting Lambdas
Functional Programming in Java 8 - Exploiting LambdasFunctional Programming in Java 8 - Exploiting Lambdas
Functional Programming in Java 8 - Exploiting Lambdas
Ganesh Samarthyam
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
Romain Francois
 
iPython
iPythoniPython
iPython
Aman Lalpuria
 
python codes
python codespython codes
python codes
tusharpanda88
 
Java Class Design
Java Class DesignJava Class Design
Java Class Design
Ganesh Samarthyam
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
Saraswathi Murugan
 
Javaz. Functional design in Java 8.
Javaz. Functional design in Java 8.Javaz. Functional design in Java 8.
Javaz. Functional design in Java 8.
Vadim Dubs
 
Phyton Learning extracts
Phyton Learning extracts Phyton Learning extracts
Phyton Learning extracts
Pavan Babu .G
 

What's hot (20)

The Next Great Functional Programming Language
The Next Great Functional Programming LanguageThe Next Great Functional Programming Language
The Next Great Functional Programming Language
 
Quark: A Purely-Functional Scala DSL for Data Processing & Analytics
Quark: A Purely-Functional Scala DSL for Data Processing & AnalyticsQuark: A Purely-Functional Scala DSL for Data Processing & Analytics
Quark: A Purely-Functional Scala DSL for Data Processing & Analytics
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambda
 
Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...
 
Contravariant functors in scala
Contravariant functors in scalaContravariant functors in scala
Contravariant functors in scala
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
 
Extensible Effects in Dotty
Extensible Effects in DottyExtensible Effects in Dotty
Extensible Effects in Dotty
 
Python advance
Python advancePython advance
Python advance
 
Functor, Apply, Applicative And Monad
Functor, Apply, Applicative And MonadFunctor, Apply, Applicative And Monad
Functor, Apply, Applicative And Monad
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmer
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
 
L4 functions
L4 functionsL4 functions
L4 functions
 
Functional Programming in Java 8 - Exploiting Lambdas
Functional Programming in Java 8 - Exploiting LambdasFunctional Programming in Java 8 - Exploiting Lambdas
Functional Programming in Java 8 - Exploiting Lambdas
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
iPython
iPythoniPython
iPython
 
python codes
python codespython codes
python codes
 
Java Class Design
Java Class DesignJava Class Design
Java Class Design
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
 
Javaz. Functional design in Java 8.
Javaz. Functional design in Java 8.Javaz. Functional design in Java 8.
Javaz. Functional design in Java 8.
 
Phyton Learning extracts
Phyton Learning extracts Phyton Learning extracts
Phyton Learning extracts
 

Viewers also liked

Python simplecv
Python simplecvPython simplecv
Python simplecv
UFPA
 
Tdd not sure if testing or developing
Tdd  not sure if testing or developingTdd  not sure if testing or developing
Tdd not sure if testing or developing
Renato Oliveira
 
W2py pyconpe
W2py pyconpeW2py pyconpe
W2py pyconpe
Ovidio Marinho
 
Python, A pílula Azul da programação
Python, A pílula Azul da programaçãoPython, A pílula Azul da programação
Python, A pílula Azul da programação
Marcel Caraciolo
 
Dados abertos ciencia_livre
Dados abertos ciencia_livreDados abertos ciencia_livre
Dados abertos ciencia_livre
Wikimedia Brasil
 
Gerando bindings de bibliotecas C++ para Python
Gerando bindings de bibliotecas C++ para PythonGerando bindings de bibliotecas C++ para Python
Gerando bindings de bibliotecas C++ para Python
Marcelo Lira
 
Palestra Institucional PUG-PE
Palestra Institucional PUG-PEPalestra Institucional PUG-PE
Palestra Institucional PUG-PE
Marcel Caraciolo
 
PyFoursquare: Python Library for Foursquare
PyFoursquare: Python Library for FoursquarePyFoursquare: Python Library for Foursquare
PyFoursquare: Python Library for Foursquare
Marcel Caraciolo
 
Pug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debuggerPug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debugger
pugpe
 
Uma implementação de suporte a
Uma implementação de suporte a Uma implementação de suporte a
Uma implementação de suporte a
Rômulo Jales
 
Processamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHPProcessamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHP
Ivo Nascimento
 
Criando comunidades bem sucedidas
Criando comunidades bem sucedidasCriando comunidades bem sucedidas
Criando comunidades bem sucedidas
pugpe
 
Python na formacao_de_jovens
Python na formacao_de_jovensPython na formacao_de_jovens
Python na formacao_de_jovens
Marcos Egito
 
Pep 8
Pep 8Pep 8
Qml + Python
Qml + PythonQml + Python
Qml + Python
pugpe
 
Clustering com numpy e cython
Clustering com numpy e cythonClustering com numpy e cython
Clustering com numpy e cython
Anderson Dantas
 
(entregando djangoapps)@tangerinalab - pugpe xv
(entregando djangoapps)@tangerinalab - pugpe xv(entregando djangoapps)@tangerinalab - pugpe xv
(entregando djangoapps)@tangerinalab - pugpe xv
raonyaraujo
 
REST APIs com Django
REST APIs com DjangoREST APIs com Django
REST APIs com Django
Mailson Menezes
 
Wikilytics
WikilyticsWikilytics
Wikilytics
pugpe
 
Palestra sobre Inteligência Coletiva
Palestra sobre Inteligência ColetivaPalestra sobre Inteligência Coletiva
Palestra sobre Inteligência Coletiva
pugpe
 

Viewers also liked (20)

Python simplecv
Python simplecvPython simplecv
Python simplecv
 
Tdd not sure if testing or developing
Tdd  not sure if testing or developingTdd  not sure if testing or developing
Tdd not sure if testing or developing
 
W2py pyconpe
W2py pyconpeW2py pyconpe
W2py pyconpe
 
Python, A pílula Azul da programação
Python, A pílula Azul da programaçãoPython, A pílula Azul da programação
Python, A pílula Azul da programação
 
Dados abertos ciencia_livre
Dados abertos ciencia_livreDados abertos ciencia_livre
Dados abertos ciencia_livre
 
Gerando bindings de bibliotecas C++ para Python
Gerando bindings de bibliotecas C++ para PythonGerando bindings de bibliotecas C++ para Python
Gerando bindings de bibliotecas C++ para Python
 
Palestra Institucional PUG-PE
Palestra Institucional PUG-PEPalestra Institucional PUG-PE
Palestra Institucional PUG-PE
 
PyFoursquare: Python Library for Foursquare
PyFoursquare: Python Library for FoursquarePyFoursquare: Python Library for Foursquare
PyFoursquare: Python Library for Foursquare
 
Pug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debuggerPug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debugger
 
Uma implementação de suporte a
Uma implementação de suporte a Uma implementação de suporte a
Uma implementação de suporte a
 
Processamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHPProcessamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHP
 
Criando comunidades bem sucedidas
Criando comunidades bem sucedidasCriando comunidades bem sucedidas
Criando comunidades bem sucedidas
 
Python na formacao_de_jovens
Python na formacao_de_jovensPython na formacao_de_jovens
Python na formacao_de_jovens
 
Pep 8
Pep 8Pep 8
Pep 8
 
Qml + Python
Qml + PythonQml + Python
Qml + Python
 
Clustering com numpy e cython
Clustering com numpy e cythonClustering com numpy e cython
Clustering com numpy e cython
 
(entregando djangoapps)@tangerinalab - pugpe xv
(entregando djangoapps)@tangerinalab - pugpe xv(entregando djangoapps)@tangerinalab - pugpe xv
(entregando djangoapps)@tangerinalab - pugpe xv
 
REST APIs com Django
REST APIs com DjangoREST APIs com Django
REST APIs com Django
 
Wikilytics
WikilyticsWikilytics
Wikilytics
 
Palestra sobre Inteligência Coletiva
Palestra sobre Inteligência ColetivaPalestra sobre Inteligência Coletiva
Palestra sobre Inteligência Coletiva
 

Similar to Porque aprender haskell me fez um programador python melhor?

Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
Alexandru Bolboaca
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
g3_nittala
 
Why Haskell Matters
Why Haskell MattersWhy Haskell Matters
Why Haskell Matters
romanandreg
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
 
Practical Functional Programming Presentation by Bogdan Hodorog
Practical Functional Programming Presentation by Bogdan HodorogPractical Functional Programming Presentation by Bogdan Hodorog
Practical Functional Programming Presentation by Bogdan Hodorog
3Pillar Global
 
A Gentle Introduction to Coding ... with Python
A Gentle Introduction to Coding ... with PythonA Gentle Introduction to Coding ... with Python
A Gentle Introduction to Coding ... with Python
Tariq Rashid
 
app4.pptx
app4.pptxapp4.pptx
app4.pptx
sg4795
 
Functions.pdf
Functions.pdfFunctions.pdf
Functions.pdf
kailashGusain3
 
Functionscs12 ppt.pdf
Functionscs12 ppt.pdfFunctionscs12 ppt.pdf
Functionscs12 ppt.pdf
RiteshKumarPradhan1
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7
decoupled
 
A tour of Python
A tour of PythonA tour of Python
A tour of Python
Aleksandar Veselinovic
 
Functions_19_20.pdf
Functions_19_20.pdfFunctions_19_20.pdf
Functions_19_20.pdf
paijitk
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
Utkarsh Sengar
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
ssuserd64918
 
Functions_21_22.pdf
Functions_21_22.pdfFunctions_21_22.pdf
Functions_21_22.pdf
paijitk
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
Adam Getchell
 
Python Homework Help
Python Homework HelpPython Homework Help
Python Homework Help
Python Homework Help
 
Python cheatsheet Indian Servers
Python cheatsheet Indian ServersPython cheatsheet Indian Servers
Python cheatsheet Indian Servers
Indian Servers
 
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
Nina Zakharenko
 
Programming with Python - Week 3
Programming with Python - Week 3Programming with Python - Week 3
Programming with Python - Week 3
Ahmet Bulut
 

Similar to Porque aprender haskell me fez um programador python melhor? (20)

Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
 
Why Haskell Matters
Why Haskell MattersWhy Haskell Matters
Why Haskell Matters
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
Practical Functional Programming Presentation by Bogdan Hodorog
Practical Functional Programming Presentation by Bogdan HodorogPractical Functional Programming Presentation by Bogdan Hodorog
Practical Functional Programming Presentation by Bogdan Hodorog
 
A Gentle Introduction to Coding ... with Python
A Gentle Introduction to Coding ... with PythonA Gentle Introduction to Coding ... with Python
A Gentle Introduction to Coding ... with Python
 
app4.pptx
app4.pptxapp4.pptx
app4.pptx
 
Functions.pdf
Functions.pdfFunctions.pdf
Functions.pdf
 
Functionscs12 ppt.pdf
Functionscs12 ppt.pdfFunctionscs12 ppt.pdf
Functionscs12 ppt.pdf
 
An overview of Python 2.7
An overview of Python 2.7An overview of Python 2.7
An overview of Python 2.7
 
A tour of Python
A tour of PythonA tour of Python
A tour of Python
 
Functions_19_20.pdf
Functions_19_20.pdfFunctions_19_20.pdf
Functions_19_20.pdf
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
Functions_21_22.pdf
Functions_21_22.pdfFunctions_21_22.pdf
Functions_21_22.pdf
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Python Homework Help
Python Homework HelpPython Homework Help
Python Homework Help
 
Python cheatsheet Indian Servers
Python cheatsheet Indian ServersPython cheatsheet Indian Servers
Python cheatsheet Indian Servers
 
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
Elegant Solutions For Everyday Python Problems - PyCon Canada 2017
 
Programming with Python - Week 3
Programming with Python - Week 3Programming with Python - Week 3
Programming with Python - Week 3
 

More from UFPA

Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
UFPA
 
More Common Than You Think: An In-Depth Study of Casual Contributors
More Common Than You Think: An In-Depth Study of Casual ContributorsMore Common Than You Think: An In-Depth Study of Casual Contributors
More Common Than You Think: An In-Depth Study of Casual Contributors
UFPA
 
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
UFPA
 
Possibilidades com python
Possibilidades com pythonPossibilidades com python
Possibilidades com python
UFPA
 
Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore? Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore?
UFPA
 
Beljug2010
Beljug2010Beljug2010
Beljug2010
UFPA
 
Grails from scratch
Grails from scratchGrails from scratch
Grails from scratch
UFPA
 
A computacao e_voce_caminhos_para_seguir
A computacao e_voce_caminhos_para_seguirA computacao e_voce_caminhos_para_seguir
A computacao e_voce_caminhos_para_seguir
UFPA
 

More from UFPA (8)

Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
Evidence Briefings: Towards a Medium to Transfer Knowledge from Systematic Re...
 
More Common Than You Think: An In-Depth Study of Casual Contributors
More Common Than You Think: An In-Depth Study of Casual ContributorsMore Common Than You Think: An In-Depth Study of Casual Contributors
More Common Than You Think: An In-Depth Study of Casual Contributors
 
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
What Programmers Say About Refactoring Tools? An Empirical Investigation of ...
 
Possibilidades com python
Possibilidades com pythonPossibilidades com python
Possibilidades com python
 
Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore? Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore?
 
Beljug2010
Beljug2010Beljug2010
Beljug2010
 
Grails from scratch
Grails from scratchGrails from scratch
Grails from scratch
 
A computacao e_voce_caminhos_para_seguir
A computacao e_voce_caminhos_para_seguirA computacao e_voce_caminhos_para_seguir
A computacao e_voce_caminhos_para_seguir
 

Recently uploaded

lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
Ghh
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
2zjra9bn
 
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
taqyea
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
GabrielleSinaga
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
MuhammadWaqasBaloch1
 
Learnings from Successful Jobs Searchers
Learnings from Successful Jobs SearchersLearnings from Successful Jobs Searchers
Learnings from Successful Jobs Searchers
Bruce Bennett
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
kakomaeric00
 
IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
Base Camp
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
Thomas GIRARD BDes
 
A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024
Bruce Bennett
 
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
dsnow9802
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
cahgading001
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
SocMediaFin - Joyce Sullivan
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
Ghh
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
Alliance Jobs
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
KateRobinson68
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
Bruce Bennett
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
SnapJob
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
ashiquepa3
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Sreenivas702647
 

Recently uploaded (20)

lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
 
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
一比一原版布拉德福德大学毕业证(bradford毕业证)如何办理
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
 
Learnings from Successful Jobs Searchers
Learnings from Successful Jobs SearchersLearnings from Successful Jobs Searchers
Learnings from Successful Jobs Searchers
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
 
IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
 
A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024
 
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
 

Porque aprender haskell me fez um programador python melhor?

  • 1. Porque aprender haskell me fez um programador python melhor? @gustavopinto gustavo@entropie.com.br
  • 2. Porque aprender haskell me fez um programador python melhor? Baseado em fatos reais @gustavopinto gustavo@entropie.com.br
  • 3. Gustavo Pinto 2004 - belém, grad, php, sh 2006 - amazontic, java, xp 2008 - curitiba, msc, python 2009 - aprioriti, xp, scrum 2011 - recife, phd, haskell 2012 - entropie, lean, scala
  • 13. Mentira, tem mas é pouquinho :-)
  • 14.
  • 15.
  • 17. 1912 ~ 1954 1936
  • 18. 1912 ~ 1954 1936
  • 19. ON COMPUTABLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHEIDUNGS PROBLEM
  • 20. ON COMPUTABLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHEIDUNGS PROBLEM
  • 21. ON COMPUTABLE NUMBERS, WITH AN APPLICATION TO THE DECISION PROBLEM
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 28. 1903 ~1995 1936
  • 29. 1903 ~1995 1936
  • 30. AN UNSOLVABLE PROBLEM OF ELEMENTARY NUMBER THEORY
  • 31.
  • 32.
  • 33. 1936
  • 34.
  • 35.
  • 36. 1936
  • 39. Church-Turing thesis Equivalentes
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. Algumas features: ● Pure functions ● Functions as first-class objects ● No side effects
  • 51. Algumas features: ● Pure functions ● Functions as first-class objects ● No side effects Concurrency Friendly
  • 52.
  • 53.
  • 58. I have never considered Python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and although I had made functions first-class objects, I didn't view Python as a functional programming language. However, earlier on, it was clear that users wanted to do much more with lists and functions. http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
  • 59. I have never considered Python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and although I had made functions first-class objects, I didn't view Python as a functional programming language. However, earlier on, it was clear that users wanted to do much more with lists and functions. http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
  • 60. I have never considered Python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and although I had made functions first-class objects, I didn't view Python as a functional programming language. However, earlier on, it was clear that users wanted to do much more with lists and functions. http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
  • 61. I have never considered Python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and although I had made functions first-class objects, I didn't view Python as a functional programming language. However, earlier on, it was clear that users wanted to do much more with lists and functions. http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html
  • 62. I see list and functions
  • 63.
  • 64.
  • 65.
  • 66. if god exists: atepassar**2 hack, hack
  • 67. search_list = lambda l,e : [ [ idx for idx, element in enumerate(l) if element == element_f ] for element_f in e]
  • 68. search_list = lambda l,e : [ [ idx for idx, element in enumerate(l) if element == element_f ] for element_f in e]
  • 69. List comprehension A basic comprehension for a set that contains the first ten even natural numbers is The part before the pipe is called the output function, x is the variable, N is the input set and x <= 10 is the predicate. That means that the set contains the doubles of all natural numbers that satisfy the predicate. http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 70. List comprehension A basic comprehension for a set that contains the first ten even natural numbers is The part before the pipe is called the output function, x is the variable, N is the input set and x <= 10 is the predicate. That means that the set contains the doubles of all natural numbers that satisfy the predicate. http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 71. List comprehension A basic comprehension for a set that contains the first ten even natural numbers is >>> [i for x in range (0, 100) if x > 10] http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 72. List comprehension A basic comprehension for a set that contains the first ten even natural numbers is >>> [i for x in range (0, 100) if x > 10] >>> [[row[i] for row in matrix] for i in range(4)] http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 73. List comprehension A basic comprehension for a set that contains the first ten even natural numbers is >>> [i for x in range (0, 100) if x > 10] >>> [[row[i] for row in matrix] for i in range(4)] >>> dict([(i, chr(65+i)) for i in range(4)]) http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 74. List Sou foda comprehension A basic comprehension for a set that contains the first ten even natural numbers is >>> [i for x in range (0, 100) if x > 10] >>> [[row[i] for row in matrix] for i in range(4)] >>> dict([(i, chr(65+i)) for i in range(4)]) http://learnyouahaskell.com/starting-out#im-a-list-comprehension
  • 75. search_list = lambda l,e : [ [ idx for idx, element in enumerate(l) if element == element_f ] for element_f in e]
  • 76. Lambda Lambdas are basically anonymous functions that are used because we need some functions only once. Normally, we make a lambda with the sole purpose of passing it to a higher-order function. http://learnyouahaskell.com/higher-order-functions#lambdas
  • 77. Lambda Lambdas are basically anonymous functions that are used because we need some functions only once. Normally, we make a lambda with the sole purpose of passing it to a higher-order function. http://learnyouahaskell.com/higher-order-functions#lambdas
  • 78. Lambda >>> lambda x: x % 2 http://learnyouahaskell.com/higher-order-functions#lambdas
  • 79. Lambda >>> is_even = lambda x: x % 2 http://learnyouahaskell.com/higher-order-functions#lambdas
  • 80. Lambda >>> is_even = lambda x: x % 2 >>> is_even <function <lambda> at 0x2a3d050> http://learnyouahaskell.com/higher-order-functions#lambdas
  • 81. search_list = lambda l,e : [ [ idx for idx, element in enumerate(l) if element == element_f ] for element_f in e]
  • 82. Built-in Functions >>> for mes in enumerate (['jan', 'fev', 'mar']): ... print mes (0, 'jan') (1, 'fev') (2, 'mar')
  • 83. Built-in Functions >>> for mes in enumerate (['jan', 'fev', 'mar']): ... print mes (0, 'jan') (1, 'fev') (2, 'mar') outras built-in functions: ● filter ● map ● reduce
  • 84. Built-in Functions >>> for mes in enumerate (['jan', 'fev', 'mar']): ... print mes (0, 'jan') (1, 'fev') (2, 'mar') outras built-in functions: ● filter ● map Funções de ● reduce alta ordem
  • 85. Filter filter(...) filter(function or None, sequence) -> list, tuple or string Return those items of sequence for which function(item) is true. [....] >>> filter(lambda x: x % 2 == 0, range(10))
  • 86. Filter filter(...) filter(function or None, sequence) -> list, tuple or string Return those items of sequence for which function(item) is true. [....] >>> is_even = lambda x: x % 2 == 0 >>> filter(is_even, range(10))
  • 87. Map map(...) map(function, sequence[, sequence, ...]) -> list Return a list of the results of applying the function to the items of the argument sequence (s). [....] >>> map(lambda s: s.upper(), ['a', 'b', 'c'])
  • 88. Reduce reduce(...) reduce(function, sequence[, initial]) -> value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. [....] >>> reduce(lambda x,y: x * y, range(1, 4)) >>> reduce(lambda x, y: x + y, ['a', 'b', 'c', 'd'])
  • 89. Sua High Order Function def f(x): return x + 1 def g(function, x): return function(x) + function (x + 1) print g(f, 1)
  • 90. Sua High Order Function def f(x): return x + 1 not bad def g(function, x): return function(x) + function (x + 1) print g(f, 1)
  • 91. Porque aprender haskell me fez um programador python melhor?
  • 94. Consegui entender melhor a minha linguagem!
  • 95. Consegui entender melhor o meu framework!
  • 98. Evolua com a sua linguagem
  • 99. Domine outras linguagens (Tanto quanto)
  • 101. Seja o principal crítico das suas escolhas
  • 102. Para saber mais: from functional import *
  • 103. OBRIGADO! @gustavopinto gustavo@entropie.com.br