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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
/* Action creators, reducer and types Quokka demo */ | |
import thread from './thread' | |
const initialState = { | |
name: '', | |
points: 0, | |
likesGames: false | |
} | |
type State = typeof initialState; |
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
export default function thread<A extends any[]>(...args: A) { | |
return function through<R>(fn1: (...args: A) => R, ...fns: Array<(a: R) => R>) { | |
let res = fn1(...args) | |
for (let i = 0, n = fns.length; i < n; i++) res = fns[i](res) | |
return res | |
} | |
} | |
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
import { | |
deleteAt, | |
map, | |
mapWithIndex, | |
reduceWithIndex, | |
isEmpty | |
} from 'fp-ts/lib/Record' | |
import { flow, not, tuple } from 'fp-ts/lib/function' | |
const o = { firstName: 'Foo', lastName: 'Bar' } |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
" set rtp+=~/.config/nvim/bundle/Vundle.vim | |
" call vundle#begin() | |
set rtp+=$HOME/.vim/bundle/Vundle.vim/ | |
call vundle#begin('$HOME/.vim/bundle/') | |
" let Vundle manage Vundle, required |
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
import createPolyfunc, { DEFAULT } from "./polyfunc"; | |
const SULFURAS = "Sulfuras, Hand of Ragnaros"; | |
const AGED_BRIE = "Aged Brie"; | |
const BACKSTAGE = "Backstage passes to a TAFKAL80ETC concert"; | |
export class Item { | |
constructor(name, sellIn, quality) { | |
this.name = name; | |
this.sellIn = sellIn; |
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
import { | |
propOr, | |
prop, | |
identity, | |
compose, | |
split, | |
join, | |
toPairs, | |
reduce, | |
toLower |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
" set rtp+=~/.config/nvim/bundle/Vundle.vim | |
" call vundle#begin() | |
set rtp+=$HOME/.vim/bundle/Vundle.vim/ | |
call vundle#begin('$HOME/.vim/bundle/') | |
" let Vundle manage Vundle, required |
NewerOlder