use char->number from common in day 5
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
(import (srfi :43)) ; vector extensions
|
(import (srfi :43)) ; vector extensions
|
||||||
|
(load "../common.scm")
|
||||||
; returns numbers 0 to 9 from ascii character
|
|
||||||
(define (char->number c)
|
|
||||||
(- (char->integer c) 48)) ; 48 is ASCII's number zero
|
|
||||||
|
|
||||||
; reads a numnber from input
|
; reads a numnber from input
|
||||||
; also consumes the next non-number character in the file!
|
; also consumes the next non-number character in the file!
|
||||||
|
|||||||
Reference in New Issue
Block a user