Mapa mental
secondPart_TypesAndTypeclasses
Conteúdo do mapa
secondPart_TypesAndTypeclasses
Definition
- Type can be a label that differences the data
- Char: 'a'
- Bool: true or false
- Int: stands for integers numbers with range -2147483648 to 2147483647
- Float: stands for real floating point numbers
- Double: a floating point with decimals
- Type can be a label that differences the data
Typeclass
- A typeclass defines a behavior to a type
- Types belongs to Eq, Ord and Show classes
- Eq
- This class allows comparisons for equality
- Ord
- Ord covers all the standard comparing functions such as >, <, >= and <=.
- Show
- Convert any type to String
- Eq
- Types belongs to Eq, Ord and Show classes
- Class constrain
- everything before => is a class constraint that belongs to the class and takes its behaviors
- A typeclass defines a behavior to a type
Informações
- Descrição
- Programacion Funcional Mapa Mental sobre secondPart_TypesAndTypeclasses, criado por Daniel Velez em 27-02-2018.
- Criado por
- Daniel Velez
- Visualizações
- 0
- Histórico
-
- Criado por CUERVO ARDILA ANDRES FELIPE · 20 fev 2018
- Copiado por Daniel Velez · 27 fev 2018
- Avaliação
Mais sobre Data Types and Typeclasses