Skip to content

Instantly share code, notes, and snippets.

View tioover's full-sized avatar

ACCOUNT MOVED tioover

View GitHub Profile
@tioover
tioover / curry.rkt
Last active January 1, 2016 12:09 — forked from Javran/gist:8142839
#lang racket
(define (curry f)
(define (min-arity arity)
(if (number? arity) arity (arity-at-least-value arity)))
(define (curry-aux f args arity)
(lambda (a)
(let ((new-args (cons a args)))
(cond ((= arity 1)
(apply f (reverse new-args)))