Skip to content

Instantly share code, notes, and snippets.

@uwelo
uwelo / stream.js
Created April 13, 2021 10:00 — forked from DylanPiercey/stream.js
Progressive HTML with fetch
const getWritableDOM = (() => {
const testDoc = document.implementation.createHTMLDocument();
testDoc.write("<script>");
// Safari and potentially other browsers strip script tags from detached documents.
// If that's the case we'll fallback to an iframe implementation.
if (testDoc.scripts.length) {
return target =>
toWritable(target, document.implementation.createHTMLDocument());
} else {

Collections

Introduction to collection API

Option

There are Some and None

val i = Some(1)
val j = None

Basics

Basics lesson of the workshop.

First step

println("Hello world")

Basic types