[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] complex? call hangs function
From: |
Terrence Brannon |
Subject: |
[Chicken-users] complex? call hangs function |
Date: |
Thu, 18 Oct 2007 06:26:17 -0400 |
The following function works perfectly fine until I add
((complex? x) (steps (real-part x)))
(use srfi-1)
(use numbers)
(define steps
(lambda (x)
(cond
((zero? x) (list 0))
((negative? x) (reverse (steps (abs x))))
((complex? x) (steps (real-part x)))
(else
(let ([start (* -1 x)]
[count (+ 1 (* 2 x))])
(iota count start))))))
- [Chicken-users] complex? call hangs function,
Terrence Brannon <=