[racket] Math library ready for testing
On Mon, Dec 17, 2012 at 1:55 PM, Jens Axel Søgaard
<jensaxel at soegaard.net> wrote:
>> ====
>> moebius-mu
> Would it be enough to add "distinct" ?
IMO, yes.
>> ====
>> multinomial
>>
>> "(multinomial n ks) → Natural
>> n : Integer
>> ks : (Listof Integer)
>> ...
>>> (multinomial 5 3 2)
>> 10"
>>
>> The example does not agree with the spec.
>
> A proper formula would be easier.
>
> 5! / ( 3! * 2! ) = 120 / ( 6*2 ) = 10
>
> I read the spec to give this:
>
>> (apply / (factorial 5) (map factorial (list 2 3)))
> 10
Here there is a misunderstanding. I was not complaining about the formulas.
The spec says it is a 2-arg function, an integer and a list of
integers. In the example it takes three integers.
====
> Thanks again for the careful proof reading.
Thanks for the excellent work!
P.