This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
import Control.Monad | |
------------------------------------------------------------------------------- | |
-- State Monad Implementation | |
------------------------------------------------------------------------------- | |
newtype State s a = State { runState :: s -> (a,s) } | |
instance Monad (State s) where | |
return a = State $ \s -> (a, s) |
module STLC where | |
open import Prelude | |
open import Data.List | |
infixr 7 _=>_ | |
data Type : Set where | |
nat : Type | |
_=>_ : (a b : Type) → Type |
module SystemF where | |
open import Agda.Primitive | |
open import Prelude | |
open import Data.List | |
weaken-∈ : ∀ {a : Set} (Γ₁ : List a) {Γ x y} → x ∈ (Γ₁ ++ Γ) → x ∈ (Γ₁ ++ y ∷ Γ) | |
weaken-∈ [] (zero refl) = suc (zero refl) | |
weaken-∈ [] (suc i) = suc (suc i) | |
weaken-∈ (x ∷ Γ₁) (zero p) = zero p |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!