(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| use compiler::parser::tok::{self, Tok}; | |
| use compiler::ast::*; | |
| grammar<'input>["LALR(1)"]; | |
| extern { | |
| type Location = usize; | |
| type Error = tok::Error; | |
| enum Tok<'input> { |
| // https://codesandbox.io/s/kxzwolv9k7 | |
| import React, { Component } from 'react'; | |
| import { render } from 'react-dom'; | |
| class Ember extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { isCool: 'yasss' }; |
"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType
The following write-up is intended as an introduction into using phantom types in ReasonML.
Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.
| #!/bin/sh | |
| set -euxo | |
| cleanup() { | |
| rm -f 1.mp4 2.mp4 3.mp4 4.mp4 palette.png | |
| } | |
| trap cleanup EXIT | |
| # extend the last frame |