Skip to content

Instantly share code, notes, and snippets.

@b0oh
b0oh / lambda.js
Last active November 30, 2021 19:36
Simple inefficient lambda calculus calculator on ES5
function array_union(a, b) {
var cache = {};
function store(item) {
cache[item] = item;
}
a.forEach(store);
b.forEach(store);
return Object.keys(cache).map(function(key) { return cache[key]; });
@b0oh
b0oh / Lambda.hs
Last active December 27, 2025 06:36
Lambda
module Lambda where
import Data.Set (Set)
import Data.Set qualified as Set
import Data.Text (Text)
import Data.Text qualified as Text
newtype Symbol = Symbol Text
deriving (Eq, Ord, Show)