Automatically retries until all three checks are solved
It starts out with:
const initialState = {
checks: {
one: undefined,
two: undefined,
three: undefined
const Add = x => ({ | |
x, | |
concat: ({x: y}) => x + y, | |
fold: f => f(x) | |
}) | |
const Box = x => ({ | |
x, | |
map: f => Box(f(x)), | |
fold: f => f(x) |
import collectFPS from 'collect-fps' | |
window.onload = () => collectFPS(60, (_, x) => console.log(x)) |
const Task = require('data.task') | |
const {Repository, Branch} = require('nodegit') | |
const {cond, is, T} = require('ramda') | |
const currentBranch = () => | |
new Task((rej, res) => | |
Repository.open('.') | |
.then(repo => repo.getCurrentBranch() | |
.then(branch => Branch.name(branch).then(name => res(name)))) | |
.catch(() => res())) |
const IncrementStore = state => ({ | |
state, | |
concat: ({state: delta}) => { | |
switch (delta.type) { | |
case 'ADD': | |
return IncrementStore({ | |
value: state.value + 1 | |
}) | |
case 'REMOVE': |
Automatically retries until all three checks are solved
It starts out with:
const initialState = {
checks: {
one: undefined,
two: undefined,
three: undefined
type Input = any | |
type EffectCell = { | |
lastInputs: Array<Input>, | |
computation: (inputs: Array<Input>) => Array<Input>, | |
effect: (inputs: Array<Input>) => void, | |
dependants: Array<Cell> | |
} | |
const computation0 = Cell() |
export default (reducer, initialState, effects) => { | |
let state = initialState | |
let listeners = [] | |
const broadcast = (state) => { | |
listeners.forEach((listener) => listener(state)) | |
} | |
const push = (action) => { | |
state = reducer(state, action) |
import React from 'react' | |
const NODE_COMMENT = 8 | |
export default React.createClass({ | |
displayName: 'CommentNodeInSpan', | |
render () { | |
const {comment} = this.props | |
import React from 'react' | |
import { render } from 'react-dom' | |
import * as UI from '@klarna/ui' | |
const Workshop = React.createClass({ | |
getInitialState () { | |
return { open: false } | |
}, | |
render () { |