Mapa mental
Types and Typeclasses - Haskell
Contenido del mapa
Types and Typeclasses - Haskell
Algebraic data types
- data
- Int
- Bool
- Char
- Maybe
- Example
- data Shape
- Circle
- Rectangle
- deriving
- Show
- printing results
- Show
- data Point
- Circle
- Point
- Rectangle
- Point, Point
- Show
- Circle
- data Shape
- data
Record Syntax
- Person
- String
- String
- Int
- Float
- String
- with Record Syntax
- firstName::String
- lastName::String
- age:: Int
- height::Float
- phoneNumber:: String
- flavor::String
- Person
Type parameters
- Constructor
- data Maybe
- Nothing
- [Int]
- [Char]
- [[String]]
- Car
- a
- company
- b
- model
- c
- year
- a
- Vector
- a
- a
- a
- Nothing
- data Maybe
- Constructor
Derived instances
- Eq
- Ord
- Enum
- Bounded
- Show
- Read
Type synonyms
- [String]
- [(String,String)]
- [(Name, PhoneNumber)]
- PhoneNumber = String
- Name = String
- [(Name, PhoneNumber)]
- [(String,String)]
- [Char]
- [String]
Recursive data structures
- data List
- Empty
- Cons a (Lista a)
- listHead
- listTrail
- infixr
- *
- +
- ++
- data Tree
- singleton
- data List
Typeclasses 102
- Eq
- class Eq a where (==) :: a -> a -> Bool (/=) :: a -> a -> Bool x == y = not (x /= y) x /= y = not (x == y)
- class Eq a where (==) :: a -> a -> Bool (/=) :: a -> a -> Bool x == y = not (x /= y) x /= y = not (x == y)
- Eq
A yes-no typeclass
- Bool
- yesno::a
- False
- True
- yesno::a
- Bool
The Functor typeclass
- Functor
- fmap
- Just X
- Nothing
- Right X
- Left X
- fmap
- Functor
Kinds and some type-foo
- :k
Información
- Descripción
- Mapa Mental sobre Types and Typeclasses - Haskell, creado por Juan David Vargas el 12/04/2021.
- Creado por
- Juan David Vargas
- Visitas
- 0
- Valoración