[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trunc, round as primitive generics
From: |
Marius Vollmer |
Subject: |
Re: trunc, round as primitive generics |
Date: |
Tue, 18 May 2004 23:10:46 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Kevin Ryde <address@hidden> writes:
> In 1.6, `trunc' and `round' were primitive generics, but are now plain
> primitives. Does that make a difference to anything?
I don't think so. 'trunc' and 'round' do not look at the type of
their argument, they use code that is already completely 'generic'.
For example, 'truncate' is
(define (truncate x)
(if (< x 0)
(ceiling x)
(floor x)))
All type dispatch is done in 'floor' or 'ceiling', which are primitive
generics.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: trunc, round as primitive generics,
Marius Vollmer <=