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
// See the flow link at the bottom, and the GIT comment below | |
// Good utils | |
type $If<X: boolean, Then, Else = empty> = $Call<((true, Then, Else) => Then) & ((false, Then, Else) => Else), X, Then, Else>; | |
type $Not<X: boolean> = $If<X, false, true>; | |
type $And<X: boolean, Y: boolean> = $If<X, Y, false>; | |
type $Or<X: boolean, Y: boolean> = $If<X, true, Y>; | |
// Unique, internal Symbols. Probably I can actually use JS's Symbol. Need to see how well Flow implements it |
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
//@flow | |
import * as React from 'react'; | |
type Hom<-A, +B> = React.AbstractComponent<A, B>; | |
// A is the Category of Props: They are represented as objects { [string]: any } | |
// B is the Category of Elements: They are represented as JSX. | |
// | |
// Diverging now into other another Category: the category of Sets | |
// Fix for now a map |