Suppose we want a set of unique { x, y }
points to plot on a graph.
this expression:
new Set([
{ x: 1, y: 1 },
{ x: 1, y: 1 },
]);
import {Block} from 'payload/types'; | |
const createRecursiveLinksBlock = (current = 0, maxDepth = 3): Block => { | |
if (current < maxDepth - 1) { | |
current++; | |
return { | |
slug: `Level ${current}`, | |
fields: [ | |
{ | |
name: 'name', |
open System | |
/// A train carriage can have a number of different features... | |
type Feature = Quiet | Wifi | Toilet | |
/// Multiple classes | |
type CarriageClass = First | Second | |
/// Carriages can be either for passengers or the buffet cart | |
type CarriageKind = |
Suppose we want a set of unique { x, y }
points to plot on a graph.
this expression:
new Set([
{ x: 1, y: 1 },
{ x: 1, y: 1 },
]);
/** Used by Flavor to mark a type in a readable way. */ | |
export interface Flavoring<FlavorT> { | |
_type?: FlavorT; | |
} | |
/** Create a "flavored" version of a type. TypeScript will disallow mixing flavors, but will allow unflavored values of that type to be passed in where a flavored version is expected. This is a less restrictive form of branding. */ | |
export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>; | |
/** Used by Brand to mark a type in a readable way. */ | |
export interface Branding<BrandT> { | |
_type: BrandT; |
import * as t from 'io-ts' | |
import * as React from 'react' | |
import { render } from 'react-dom' | |
type Field = t.StringType | t.NumberType | t.BooleanType | |
interface Form extends t.InterfaceType<{ [key: string]: Field }> {} | |
const toReactElement = (f: Form | Field): React.ReactElement<any> => { | |
// f is a tagged union | |
switch (f._tag) { |
/* | |
Slaying a UI Anti Pattern in ReasonML | |
Based on Kris Jenkins original writing. | |
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html | |
*/ | |
type remoteData 'e 'a = | |
| NotAsked | |
| Loading | |
| Failure 'e | |
| Success 'a; |
"For services to the PureScript Community, Gary Burgess!"
You've done it, Gary. Moore, Lineker, Coleman, and now Burgess. All the work was worth it.
The halls erupted with praise. Children dressed as Space Ghost, teens with "I only get high on
Halogen
" t-shirts, a giant banner held aloft with the message, "Tuple @garyb me
". Through
the noise of the crowds and Phil's uninterpretable Northern accent, he barely managed to hear
his theme tu-
BZZP. BZZP.
First we split into groups of 5 and asked:
What experience do you have of coaching or mentoring? What’s the difference between mentoring and coaching?
Once we’d committed to confidentiality and making the workshop a safe space, in pairs we covered:
What is it like doing your job?
// following along https://medium.com/@luijar/kliesli-compositions-in-javascript-7e1a7218f0c4 | |
const R = require('ramda') | |
const Maybe = require('ramda-fantasy').Maybe | |
// parse JSON string into object | |
// parse :: String -> Object | Null | |
function parse(s) { | |
try { | |
return JSON.parse(s) | |
} catch (e) { |