This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.
There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.
Libraries are sorted by github popularity.
// This is a quick demonstration of "function inheritance" as described in | |
// this paper from Daniel Brown and William Cook. | |
// http://www.cs.utexas.edu/users/wcook/Drafts/2009/sblp09-memo-mixins.pdf | |
// Expressed in TypeScript (and without the monads). | |
// Syntax note: When you write function types in TypeScript, you need to name | |
// each parameter. But the names don't actually matter, so I just use _. You | |
// can read `(_:A) => B` as `a -> b` in ML or Haskell syntax. | |
// In Brown and Cook's Haskell, `type Gen a = a -> a` is a "generator." The |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# @author weishu @2015/12/7 | |
import subprocess | |
import os | |
import re | |
import json |