From bdc9004df681666615b979926f3c2cd0ef1c3528 Mon Sep 17 00:00:00 2001 From: MsK` Date: Sat, 11 Dec 2021 20:19:34 +0100 Subject: [PATCH] use char->number from common in day 5 --- 05-hydrothermal-venture/code.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/05-hydrothermal-venture/code.scm b/05-hydrothermal-venture/code.scm index 52e486d..04ae979 100644 --- a/05-hydrothermal-venture/code.scm +++ b/05-hydrothermal-venture/code.scm @@ -1,8 +1,5 @@ (import (srfi :43)) ; vector extensions - -; returns numbers 0 to 9 from ascii character -(define (char->number c) - (- (char->integer c) 48)) ; 48 is ASCII's number zero +(load "../common.scm") ; reads a numnber from input ; also consumes the next non-number character in the file!