Changeset 38019 in project


Ignore:
Timestamp:
12/14/19 07:13:33 (12 months ago)
Author:
Kon Lovett
Message:

rm fx in favor of type system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/amb/trunk/amb.scm

    r37008 r38019  
    4242(import
    4343  (chicken type)
    44   (only (chicken fixnum) fx= fx+ fx- fxmod)
    4544  (only (chicken random) pseudo-random-integer) )
    4645(define platform-random pseudo-random-integer)
     
    5352    (define (swap-adj! i)
    5453      (let (
    55         (i+1 (fxmod (fx+ i 1) len))
     54        (i+1 (modulo (+ i 1) len))
    5655        (tmp (vector-ref vec i)) )
    5756        (vector-set! vec i (vector-ref vec i+1))
    5857        (vector-set! vec i+1 tmp) ) )
    59     (do ((n (integer-length len) (fx- n 1)))
    60         ((fx= n 0))
     58    (do ((n (integer-length len) (- n 1)))
     59        ((= n 0))
    6160      (swap-adj! (rnd len)) ) ) )
    6261
Note: See TracChangeset for help on using the changeset viewer.