- monads were added before applicative
- applicative is a superclass of monad
- inspired by a paper - http://strictlypositive.org/Idiom.pdf
- applicative has a bunch of laws (in category theory)
- if something implements applicative it should follow these laws
- it is possible to implement without the laws but it isn’t a valid instance
- none of the laws are checked by the type system but we can check them with tests (ie property tests)
- http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html (use pictures but descriptions about wrapping are incorrect/needs better descriptive language)
Representation of the mathematical functor: a mapping between categories in the context of category theory.
A fold deals with two things: a combining function, and a data structure, typically a list of elements. The fold then proceeds to combine elements of the data structure using the function in some systematic way.
In terms of category theory, Hask is the category of Haskell types and functions. The objects of Hask are Haskell types.
String has exactly one use, and that’s showing Hello World in tutorials. For all other uses it is the wrong choice and you should instead you should use Text for encoded textual strings and ByteString if you are dealing with raw bites in memory.
The default String type in Haskell is defined as type String = [Char], meaning a String is a list of characters. It has nothing to say about encodings, efficiency of storage (that list is going to be a linked list under the hood) or anything really that you would expect from a modern language.
- cannot be a sumtype
- needs to have a constructor which can only take in a singular argument
- Uses content from https://wiki.haskell.org/HaskellWiki:Copyrights