Skip to content

Instantly share code, notes, and snippets.

View icylace's full-sized avatar
🎯
Focusing

Ron Martinez icylace

🎯
Focusing
View GitHub Profile

Suggested Improvements for the Haskell Book v1.0RC4 - Part 1

Note: Page numbers used here are the ones for the "haskell-programming-1.0RC4-screen" version of the book.

Page xvii, Section "Acknowledgements", Paragraph 2

Content in question: "Their reviews helped ensure the book is suitable for both beginners and comprehensive."

Critique: This line doesn't appear to be grammatically correct or at the very least it's worded awkwardly.

@icylace
icylace / mergeClasses.js
Last active August 26, 2020 14:08
Merges `class` property values for Hyperapp elements.
// The `class` property for Hyperapp virtual DOM elements can take multiple
// forms. This function is able to merge two such values using the form
// of the initial value if possible.
const mergeClasses = (a, b) => {
if (typeof a === "boolean") {
return b
}
if (typeof a === "string") {
if (typeof b === "boolean") {
@icylace
icylace / typescript.md
Last active May 17, 2021 13:19
WORK-IN-PROGRESS Preliminary TypeScript documentation for Hyperapp

TypeScript Support

Hyperapp comes with TypeScript support out-of-the-box. For those unaware, TypeScript is essentially JavaScript with the added precision of static typing, amongst other things. For the remainder of this document we'll assume you have some familiarity setting up and working with TypeScript so we can focus on Hyperapp-specific info.


Preparation

Hyperapp's type definitions take advantage of certain others that come bundled with TypeScript. So, in your project's tsconfig.json be sure to have at a bare minimum: