From 1db904e6a1a373564c78330b946f8a4d07863acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Wed, 5 Apr 2017 15:02:38 +0200 Subject: [PATCH] add 'unit'-predicate for ingredients --- parse.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parse.scm b/parse.scm index c65435d..55922ad 100644 --- a/parse.scm +++ b/parse.scm @@ -22,6 +22,11 @@ (lambda (ingredient) (car ingredient))) +(define ingredient-unit + (lambda (ingredient) + (if (= (length ingredient) 2) + "" + (car (cdr ingredient))))) ;;