Breaking Out Of The Fear Cycle
- Cautionary Tales
(I'm not sure which one applies the best here)
- Keynote (40m)
| const formMachine = Machine({ | |
| id: "formMachine", | |
| initial: "editing", | |
| context: { | |
| questions: [], | |
| name: "" | |
| }, | |
| states: { | |
| editing: { | |
| initial: "addOnly", |
| const puppeteer = require("puppeteer"); | |
| const readline = require("readline"); | |
| const rl = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout, | |
| terminal: false | |
| }); | |
| const eq = (a, b) => { |
| const API_BASE = "https://api.citybik.es"; | |
| const fetchP = require("node-fetch"); | |
| const { | |
| Async, | |
| pipeK, | |
| propOr, | |
| } = require("crocks"); | |
| const fetch = Async.fromPromise(fetchP); |
| // Needs to return the first repeated letter | |
| // Points for reduced O complexity | |
| // Challenge: Write a function that given a string, returns the first char that is repeated | |
| // Example, the first letter to be repeated in this sentence is 't' | |
| import { | |
| safeLift, | |
| isString, | |
| head, | |
| tail, |
| const Brakes = require('brakes'); | |
| const Async = require('crocks/Async'); | |
| const fetch = require('node-fetch'); | |
| const assoc = require('crocks/helpers/assoc'); | |
| const compose = require('crocks/helpers/compose'); | |
| const composeK = require('crocks/helpers/composeK'); | |
| const defaultTo = require('crocks/helpers/defaultTo'); | |
| const propOr = require('crocks/helpers/propOr'); | |
| const and = require('crocks/logic/and'); |
| // This little workaround allows us to have a fallback value if our remote service fails us | |
| let lastKnownGood = { | |
| count: 0, | |
| fixtures: [], | |
| }; | |
| const fetchJson = (url, options) => fetch(url, options).then(res => res.json()); | |
| const fetchm = nAry(2, Async.fromPromise(fetchJson)); | |
| const toDate = d => new Date(d); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| .my-list { | |
| padding: 0; | |
| margin: 0; |