View SketchSystems.spec
Bus App | |
display | |
RELOAD -> loading | |
loading | |
LOAD_OK -> display | |
LOAD_FAIL -> error | |
error | |
RELOAD -> loading | |
View SketchSystems.spec
Gallery App | |
gallery | |
SEARCH -> loading | |
SELECT_PHOTO -> photo | |
RELOAD -> gallery | |
loading | |
CANCEL -> gallery | |
SEARCH_FAILED -> error | |
SEARCH_SUCCESS -> gallery | |
error |
View fat.js
import io from 'socket.io-client' | |
const A = require('automerge') | |
const foo = bar => { | |
bar.map( b => b.title ) | |
} | |
startConnection() { | |
this.socket = io('http://localhost:5000') |
View a.hs
-- f (x:xs) = case x `elem` xs of | |
-- True -> f xs | |
-- False -> x | |
f s = f' $ map toLower s | |
where | |
f' (x:xs) = | |
case x `elem` xs of | |
True -> f' xs | |
False -> x |
View Interop2.hs
module Main where | |
import Control.Monad.State | |
import System.Directory | |
import System.Exit | |
import System.FilePath | |
import Data.Time | |
data File = File | |
{ name :: FilePath |
View Interop.hs
{- | |
Functionality: | |
- Read all folders and sub-folders with structure like below | |
- store all folder and file info in State monad, | |
- at the end of the loop, print it. | |
├── aaa | |
│ ├── b | |
│ │ ├── b1 | |
│ │ │ ├── b1-1 |
View v3.hs
module Bar () where | |
import Data.Maybe | |
import Control.Monad.State | |
import qualified Data.Map as M | |
data Item = Item { | |
sId :: String, | |
pId :: String, | |
value :: [Char], | |
children :: [String] |
View v2.hs
data Item = Item { | |
sId :: String, | |
pId :: String, | |
value :: [Char], | |
children :: [Item] | |
} deriving (Show) | |
list :: [Item] | |
list = [ | |
Item { sId="1", pId="0", value="1", children=[] }, |
View v1.hs
data Item = Item { | |
sId :: String, | |
pId :: String, | |
value :: [Char], | |
children :: [String] | |
} deriving (Show) | |
list :: [Item] | |
list = [ | |
Item { sId="1", pId="0", value="1", children=[] }, |
View WriterMonadExample.hs
module Bar | |
( | |
) where | |
import System.IO | |
import System.Environment | |
import Control.Monad | |
import Data.Maybe | |
import Data.List | |
import Control.Monad.Writer |