Skip to content

Instantly share code, notes, and snippets.

View adeleke5140's full-sized avatar
💭
crafting software

Kenny adeleke5140

💭
crafting software
View GitHub Profile
@adeleke5140
adeleke5140 / cons.js
Created January 27, 2023 23:22 — forked from abiodun0/cons.js
For next blog post con cdr car
const cons = (x, y) => (m) => m(x, y)
const car = (z) => z((p, q) => p)
const cdr = (z) => z((p, q) => q)
const someLinkedList = cons(1, cons(2, cons(3 , null)))
// iterating