[plt-scheme] TypedScheme: alpha release
Gregory Woodhouse @ 2006-12-19 9:36:09 AM
"[plt-scheme] TypedScheme: alpha release" <mid:4FBFAF62-ECAD-4388-A52F-E9D82420160D at sbcglobal.net>
> typecheck: Too many arguments to function, expected 1, got 2 in: (#%
> app fib (#%app - n (#%datum . 1)) (#%app - n (#%datum . 2)))
> I presume that wasn't expected.
I'd say that is was. Try this:
(module fib (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 1))
(define: (fib [n : number]) : number
(let: ([base? : boolean (or (= 0 n) (= 1 n))])
(if base? 1
(+ (fib (- n 1)) (fib (- n 2)))))))
--
Chris Warrington <chrisw at rice.edu>
I just found the last bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20061219/177e6ca7/attachment.sig>