mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-26 22:32:44 +03:00
Fix runtime error in (the Int (cast "")).
This commit is contained in:
parent
725e5ac13d
commit
2cadbd2cd1
@ -19,7 +19,8 @@
|
||||
(if (number? x) x 0)))
|
||||
(define destroy-prefix
|
||||
(lambda (x)
|
||||
(if (eqv? (string-ref x 0) #\#) "" x)))
|
||||
(if (eqv? x "") ""
|
||||
(if (eqv? (string-ref x 0) #\#) "" x))))
|
||||
(define cast-string-int
|
||||
(lambda (x)
|
||||
(floor (cast-num (string->number (destroy-prefix x))))))
|
||||
|
@ -19,7 +19,8 @@
|
||||
(if (number? x) x 0)))
|
||||
(define destroy-prefix
|
||||
(lambda (x)
|
||||
(if (eqv? (string-ref x 0) #\#) "" x)))
|
||||
(if (eqv? x "") ""
|
||||
(if (eqv? (string-ref x 0) #\#) "" x))))
|
||||
(define cast-string-int
|
||||
(lambda (x)
|
||||
(floor (cast-num (string->number (destroy-prefix x))))))
|
||||
|
@ -19,7 +19,8 @@
|
||||
(if (number? x) x 0)))
|
||||
(define destroy-prefix
|
||||
(lambda (x)
|
||||
(if (eqv? (string-ref x 0) #\#) "" x)))
|
||||
(if (eqv? x "") ""
|
||||
(if (eqv? (string-ref x 0) #\#) "" x))))
|
||||
(define cast-string-int
|
||||
(lambda (x)
|
||||
(floor (cast-num (string->number (destroy-prefix x))))))
|
||||
|
Loading…
Reference in New Issue
Block a user