Hi Matthias,
Thanks for the lesson and the reformatting too. I had thought that the
"(module... " format was needed... it's nice to get back that indent.
In case you're intestered, here some of my uses of these continued fraction
classes:
First a use of gencontfrac%
; repeat procedure for cont
On May 20, 2012, at 11:02 AM, Joe Gilray wrote:
> 1) Is what I've done an abomination? Am I simply abusing inheritance?
You are changing a part of a recursive nest of methods, which is what
inheritance is all about.
> 2) To make the code below work, I had to make expand-repeat public as I
Hi Matt,
Thanks, what you wrote makes perfect sense (of course... that's what I get
for programming at such hours!)
Anyway, working code included below and the main purpose of learning about
classes in Racket helped along the way.
To take a step back and look at what I've "accomplished" in this
The problem is that `start' doesn't get a value for a `sqrtcontfrac%'
instance until `super-new' in `sqrtcontfrac%' is evaluated. But the
expression for the second argument in `super-new' calls `build-repeat',
so that `build-repeat' tries to use `start' before it has a value.
I'm not sure of the s
I'm trying to learn to use classes in Racket. I did some successful simple
experiments then moved on to inheritance. When I try to use the code
below, the following code:
(new sqrtcontfrac% [sqrval i]) leads to the message: sqr: expected
argument of type ; given #
Why isn't start being inherit
5 matches
Mail list logo