This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
<script | |
crossorigin | |
src="https://unpkg.com/react@16/umd/react.production.min.js" |
This file contains hidden or 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
open Revery.UI; | |
open Revery.UI.Components; | |
open Revery.Core; | |
open Revery.Core.Window; | |
open Revery.Core.Events; | |
open Revery.Core.Key; | |
type todo = { | |
id: int, |
This file contains hidden or 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
/* | |
Combine reducers actually a function that takes | |
an object that has shape | |
type Reducer = (state, action) => state; | |
{ | |
[key: string]: Reducer | |
} |
This file contains hidden or 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 | |
/* eslint-disable */ | |
import * as React from 'react'; | |
import { | |
EvilIcons as Icon, | |
MaterialCommunityIcons as MIcon, | |
} from '@expo/vector-icons'; | |
import { | |
createStackNavigator, |
This file contains hidden or 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
async function getUsersAsync(dispatch) { | |
dispatch({ type: "FETCH_REQUESTED" }); | |
try { | |
let data = await fetch("https://api.github.com/users").then(res => | |
res.json() | |
); | |
dispatch({ type: "FETCH_SUCCEED", data }); | |
} catch (error) { | |
dispatch({ type: "FETCH_FAILED", error: error }); | |
} |
This file contains hidden or 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
open Reprocessing; | |
module Constants = { | |
module Window = { | |
let width = 600; | |
let height = 600; | |
}; | |
module Color = { | |
let black = Constants.black; |
This file contains hidden or 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
open Reprocessing; | |
let width = 640; | |
let height = 360; | |
let rec drawRec = (~x, ~y, ~dimension, env) => { | |
Draw.stroke(Constants.black, env); | |
Draw.strokeWeight(1, env); | |
Draw.noFill(env); | |
Draw.rect(~pos=(x, y), ~width=dimension, ~height=dimension, env); |
This file contains hidden or 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
let option_map = (fn, opt_value) => | |
switch (opt_value) { | |
| None => None | |
| Some(value) => Some(fn(value)) | |
}; | |
module View = { | |
[@bs.module "react-native-web"] | |
external _view : ReasonReact.reactClass = "View"; | |
let make = |
This file contains hidden or 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
module Utils = { | |
let rec repeat = (whatToRepeat, howManyTimes) => | |
switch howManyTimes { | |
| 0 => "" | |
| someNumber when howManyTimes > 0 => whatToRepeat ++ repeat(whatToRepeat, howManyTimes - 1) | |
| _ => "" | |
}; | |
let rec makePairFromList = (xs) => | |
switch xs { | |
| [] => [] |