Skip to content

Instantly share code, notes, and snippets.

View chasm's full-sized avatar

Charles F. Munat chasm

View GitHub Profile
@chasm
chasm / board-with-buttons.html
Created July 24, 2022 23:08
Tic-tac-toe board using buttons
<div class="board">
<button></button>
<button></button>
<button></button>
<button></button>
<button></button>
<button></button>
<button></button>
<button></button>
<button></button>
@chasm
chasm / board.html
Created July 24, 2022 06:13
Naïve empty tic-tac-toe board
<div class="board">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
@chasm
chasm / curry.js
Last active April 26, 2021 00:51
Function to curry other functions
function curryN(f, n) {
return (...args) => {
return args.length < n
? (...rest) => curryN(f, n)(...args, ...rest)
: f(...args)
}
}
function curry(f) {
const numberOfParams = f.length