[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile 3 update: more number unboxing improvements
From: |
Stefan Monnier |
Subject: |
Re: guile 3 update: more number unboxing improvements |
Date: |
Wed, 29 Nov 2017 22:03:08 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (define (out-of-range x) (error "out of range" x))
> (define (not-int x) (error "expected an integer" x))
> (cond
> ((fixnum? x)
> (if (<= -10 x 100)
> (* x 2)
> (out-of-range x)))
> ((bignum? x)
> (if (<= -10 x 100)
> (* x 2)
> (out-of-range x)))
> (else
> (not-int x)))
Looks a bit like the result of "splitting tails", in this case,
tho selectively.
Stefan