This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Example where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stack | |
-- stack --resolver lts-18.8 script | |
{-# LANGUAGE OverloadedStrings #-} | |
{- | |
This is a handy illustration of converting between five of the commonly-used | |
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
Text). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Aff (attempt, forkAff, launchAff) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class (liftEff) | |
import Control.Monad.Eff.Console (CONSOLE, log) | |
import Control.Monad.Eff.Exception (EXCEPTION) | |
import Data.Either (Either(..)) | |
import Node.Encoding (Encoding(..)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
// USING PROPS | |
import Rx, { BehaviorSubject, Observable } from 'rxjs'; | |
import React, { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
type AppState = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Eff.Console (log, CONSOLE) | |
import Control.Monad.Eff | |
import Control.Monad.Eff.Class | |
import Control.Monad.Aff | |
import Control.Monad.Eff.Exception | |
import Data.Maybe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; style.css -- basic (lame) transitions, for demonstration | |
;;________________________________________________________________ | |
.pageChange-enter { | |
opacity: 0.01; | |
} | |
.pageChange-enter.pageChange-enter-active { | |
opacity: 1; | |
transition: opacity 500ms ease-in; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject udemy "0.1.0" | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[org.clojure/clojurescript "1.7.228"] | |
[reagent "0.5.1" | |
:exclusions [org.clojure/tools.reader, cljsjs/react]] | |
[cljsjs/react-with-addons "0.13.3-0"] | |
[reagent-forms "0.5.16"] | |
[reagent-utils "0.1.7"] | |
[re-frame "0.5.0"] | |
[org.clojure/core.async "0.2.374"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import qualified Data.Aeson.Encode as A | |
import Data.ByteString.Lazy (toStrict) | |
import Data.Either |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Combine exposing (Parser, string, parse, end, andThen, many1, while, many, skip, Result (..)) | |
import Combine.Char exposing (noneOf, char) | |
import Combine.Num exposing (int) | |
import Combine.Infix exposing ((<$>), (<$), (<*), (*>), (<*>), (<|>)) | |
import Maybe exposing (Maybe) | |
import History exposing (path, setPath) | |
import Signal exposing (Signal, (<~), (~), send, message) | |
import Effects exposing (Effects, task) |