Re: Efficient way to code "(symbol,multiplicity)-counting" - how?

2002-05-23 Thread Mark Phillips
Dylan Thurston wrote: > On Thu, May 23, 2002 at 04:44:25PM +0930, Mark Phillips wrote: > ... > >>We "count" as follows: >>[] [x] [y] [z] [x,y] [x,z] [y,x] [y,y] [y,z] [z,x] [z,y] [x,y,y] [x,y,z] >>[x,z,y] [y,x,y] [y,x,z] [y,y,x] [y,y,z] [y,z,x] [y,z,y] [z,x,y] [z,y,x] >>[z,y,y] [x,y,y,z] [

Re: Efficient way to code "(symbol,multiplicity)-counting" - how?

2002-05-23 Thread Dylan Thurston
On Thu, May 23, 2002 at 04:44:25PM +0930, Mark Phillips wrote: ... > We "count" as follows: > [] [x] [y] [z] [x,y] [x,z] [y,x] [y,y] [y,z] [z,x] [z,y] [x,y,y] [x,y,z] > [x,z,y] [y,x,y] [y,x,z] [y,y,x] [y,y,z] [y,z,x] [y,z,y] [z,x,y] [z,y,x] > [z,y,y] [x,y,y,z] [x,y,z,y] [x,z,y,y] [y,x,y,z] [y,x,z,

.

2002-05-23 Thread @Traduire
Bonjour, Nous souhaitons vous faire connaître les services du Bureau International "@Traduire.com" Le Bureau International “@Traduire.com” répond à tous vos besoins en traduction, en vous offrant des solutions globales d'édition numérique plurilingue : traduction dans toutes les langues, in

Re: Prob with numeric values

2002-05-23 Thread Janis Voigtlaender
Jos Mistiaen wrote: > (When I type inc 5::Int it does the job perfectly, because I explicitly say > 5 is an Integer, but how can I tell the program 5 is an Int?ithout > saying it explicitly in the prompt) You HAVE to tell the program that 5 is an Int, because there might be other instances o

Re: Prob with numeric values

2002-05-23 Thread Tom Schrijvers
> Hello, > > I m having some difficulties with the following thing: > > I've made a class which looks somehow like this: > class A a where >inc::a->a > > > now, when I want to make a instance of it with type Int and define the > function inc like this: > > instance A Int where > i

Re: Prob with numeric values

2002-05-23 Thread Martin Norbäck
tor 2002-05-23 klockan 15.38 skrev Jos Mistiaen: > Hello, > > I m having some difficulties with the following thing: > > I've made a class which looks somehow like this: > class A a where >inc::a->a > > > now, when I want to make a instance of it with type Int and define the > funct

Prob with numeric values

2002-05-23 Thread Jos Mistiaen
Hello, I m having some difficulties with the following thing: I've made a class which looks somehow like this: class A a where inc::a->a now, when I want to make a instance of it with type Int and define the function inc like this: instance A Int where inc a = a + 1 I can't ma

Re: Efficient way to code "(symbol,multiplicity)-counting" - how?

2002-05-23 Thread Alastair Reid
This looked like a fun problem. Here's a solution and some comments on how I went about solving it. -- Alastair ReidReid Consulting (UK) Ltd > import List( nub ) > import Maybe( fromMaybe, fromJust ) It seems like your enumerations have two constraints: 1) They have to obey the m