From fa2751d1201b83e32ba6074e68259ac467595808 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 8 Apr 2021 19:02:18 +0200 Subject: Neater abstraction for fade types --- guile/starlet/utils.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guile/starlet/utils.scm') diff --git a/guile/starlet/utils.scm b/guile/starlet/utils.scm index 940441c..24a2b5c 100644 --- a/guile/starlet/utils.scm +++ b/guile/starlet/utils.scm @@ -3,6 +3,7 @@ #:export (print-hash-table copy-hash-table partial + partial-start in-range mean flatten-sublists @@ -30,6 +31,11 @@ (f first-val second-val))) +(define (partial-start f first-val) + (lambda args + (apply f first-val args))) + + (define (in-range a val1 val2) (or (and (>= a val1) -- cgit v1.2.3