Skip to content

Instantly share code, notes, and snippets.

@khoi
khoi / Makefile
Last active January 31, 2026 13:11
https://supacode.sh Makefile
# https://supacode.sh Makefile
# Sensible defaults
.ONESHELL:
SHELL := bash
.SHELLFLAGS := -e -u -c -o pipefail
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
# Derived values (DO NOT TOUCH).
@khoi
khoi / curry.swift
Last active November 9, 2017 15:58
emoji oriented programming
//Emojify https://github.com/thoughtbot/Curry/blob/master/Source/Curry.swift
import Foundation
public func ๐Ÿ›<๐Ÿถ, ๐Ÿ˜บ>(_ function: @escaping (๐Ÿถ) -> ๐Ÿ˜บ) -> (๐Ÿถ) -> ๐Ÿ˜บ {
return { (a: ๐Ÿถ) -> ๐Ÿ˜บ in function(a) }
}
public func ๐Ÿ›<๐Ÿถ, ๐Ÿ˜บ, ๐Ÿญ>(_ function: @escaping (๐Ÿถ, ๐Ÿ˜บ) -> ๐Ÿญ) -> (๐Ÿถ) -> (๐Ÿ˜บ) -> ๐Ÿญ {
return { (a: ๐Ÿถ) -> (๐Ÿ˜บ) -> ๐Ÿญ in { (b: ๐Ÿ˜บ) -> ๐Ÿญ in function(a, b) } }
}