mit-scheme-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-users] ERROR: Wrong number of arguments to #<procedure .


From: Simon Huskier
Subject: Re: [MIT-Scheme-users] ERROR: Wrong number of arguments to #<procedure ......
Date: Thu, 12 Jul 2012 09:22:37 +0800

Thanks, Campbell. It does works!

(define (eps-func p)
   (let* ((lattice->cartesian p)
             (x (vector3-x p))
             (y (vector3-y p))
             (z (vector3-z p)))
   (if (> (+ (* (sin (* 2 pi x)) (cos (* 2 pi y))) 
        (* (sin (* 2 pi y)) (cos (* 2 pi z))) 
(* (sin (* 2 pi z)) (cos (* 2 pi x))))
     isoval)
                (make dielectric
                        (epsilon epsc))
                (make dielectric
                        (epsilon 1)))))

One more question. The let statement syntax is
(let (<binding list>) <body>)

However, we put a function call first----(lattice->cartesian p)----in the binding list in the above code. Is it the correct syntax?

Thanks.

Regards,

Simon

On Thu, Jul 12, 2012 at 8:37 AM, Taylor R Campbell <address@hidden> wrote:
   Date: Thu, 12 Jul 2012 08:27:11 +0800
   From: Simon Huskier <address@hidden>

   Campbell, Could you say it more directly? How should I correct my code?

I don't know what argument you intended to pass to LATTICE->CARTESIAN,
but perhaps you should change

(lattice->cartesian)

to

(lattice->cartesian p)

Also, it looks like you mistakenly used the `f(x)' notation, rather
than `(f x)', to compute a sine below:

(> sin(* 2 pi x y z) 0)

That should probably be

(> (sin (* 2 pi x y z)) 0)

   Maybe it is Guile mail list, but they are all Scheme.

This isn't the Guile list either.  It's the MIT Scheme list:
<http://www.mit-scheme.org/>.  You would probably be better served --
by reaching a wider audience -- somewhere such as comp.lang.scheme.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]