Hopefully the following will help. If I've missed the thrust of your
questions, feel free to disregard while someone else improves on my
answer :) I only overloaded the infix:+ operator, but it should give
you an idea.
I would write the class comme ça:
use v6-alpha;
class Register {
has
Haha, that will teach me for trying to golf on public mailing lists.
It should actually read:
sub int2vec ($n) {
+(sprintf(%b,$n).split('')); # now I'm just golfing :-D
}
unless you only ever want to use it with the number 7.
-db.
- Original Message
From: David