fp-ddd chapter 6
fp-ddd chapter 5
fp-ddd chapter 4
Node Child Process
Take note from node-child process More information, read source.
4 ways to create a child process
- spawn()
- fork()
- exec()
- execFile()
Node Stream
Take note from node-stream More information, read source.
Purescript Types
Some though about types in purescript
- data Foo = Foo Int: Foo and Int totally different.
- newtype Foo = Foo Int: Foo and Int different at compile time but same at runtime.
- type Foo = Int: Foo and Int same at compile time and runtime.
Functor
Functor
- Container with somewhere to store values(s)
- Some way of applying a function to values(s)
- Must return values(s) in same context
or a shorter explain:
a functor is simply something that can be mapped over
Monid
a monoid is a semigroup with an identity element.
Semigroup
A semigroup is an algebraic structure with a binary operation that satisfies the associativity law.
In PureScript, the binary operation for a semigroup that satisfies the associative property is called append, whose infix operator is <>
monoid
Identity: whenever we append one or more elements to it, we get back those elements
In PureScript, mempty (monoid empty) to reference the identity element of a monoid.
Purescript Note
Notebook for PureScript by Example
https://leanpub.com/purescript/read#leanpub-auto-functions-and-records