#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
module Expr | |
import Data.Vect | |
import Data.Fin | |
data Expr : Nat -> Type where | |
Var : Fin n -> Expr n | |
Lam : Expr (S n) -> Expr n | |
App : Expr n -> Expr n -> Expr n | |
data Closure : Type where |
Sometimes it would be nice if a type system could automatically "do it's best" | |
to restrict what a value will be. For example, the type `Bool` is the compiler | |
saying the value will either be `True` or `False`, but it doesn't know which. | |
What we want is the compiler to be able to be precise when possible, so instead | |
of always saying `Bool` (or "I don't know"), it could say `True`, `False`, or | |
`Bool`. This gist shows how Hindley Milner already has this capability that can | |
be exercised by using Church or Scott encodings of simple data types. | |
> {-# LANGUAGE RankNTypes #-} | |
> import qualified Data.Maybe as M |
module Classical where | |
open import Function using (_∘_; case_of_; id; _$_) | |
open import Data.Product using (_×_; _,_) | |
open import Data.Sum using (_⊎_; inj₁; inj₂) | |
open import Data.Empty using (⊥; ⊥-elim) | |
open import Data.Unit using (⊤; tt) | |
open import Data.Bool | |
using (Bool; true; false; not; if_then_else_) | |
renaming (_∨_ to _b∨_; _∧_ to _b∧_) |
{-# OPTIONS --copatterns #-} | |
module UntypedLambda where | |
open import Size | |
open import Function | |
mutual | |
data Delay (A : Set) (i : Size) : Set where |
(* -*- mode: ocaml; -*- *) | |
module type FUNCTOR = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
end | |
type 'a monoid = {unit : 'a ; join : 'a -> 'a -> 'a} | |
type var = string |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <semaphore.h> | |
sem_t semaphore; | |
void threadfunc() { |
-- Enlace: https://docs.google.com/document/d/1TTaIK1kPWuhkvWnnlf9SZSodBtSXhiewOAex4wNtSps | |
{- | |
data Raton = UnRaton String Float Float [Enfermedad] deriving | |
(Show, Eq) | |
-} | |
-- Se puede declarar el tipo de dato de esta forma, asi nos ahorramos | |
-- declarar manualmente las funciones para obtener cada componente de | |
-- un raton. | |
data Raton = UnRaton { |
# Si es a traves de internet (por ejemplo, tengo la raspberry conectada directamente al modem o con wifi): | |
sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}' | |
# Si tengo conectada la rpi conectada a mi pc mediante Ethernet: | |
# 1. Cambiar la conexión ethernet, para que comparta internet con los demas equipos. | |
# 2. Usar ifconfig para saber cual es la dirección de broadcast de la interfaz Ethernet | |
# 3. Utilizar nmap de forma similar al otro caso, pero con la direccción de broadcast de Ethernet: | |
sudo nmap -sP 10.42.0.255/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}' |
#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
{-# START_FILE {{name}}.cabal #-} | |
name: {{name}} | |
version: 0.1.0.0 | |
synopsis: Initial project template from stack | |
description: Please see README.md | |
license: GPL-3 | |
license-file: LICENSE | |
author: {{author-name}}{{^author-name}}Author name here{{/author-name}} | |
maintainer: {{author-email}}{{^author-email}}[email protected]{{/author-email}} | |
copyright: {{copyright}}{{^copyright}}{{year}}{{^year}}2017{{/year}} {{author-name}}{{^author-name}}Author name here{{/author-name}}{{/copyright}} |