"Jürgen A. Erhard" wrote:
>
> > "Manuel" == Manuel M T Chakravarty <[EMAIL PROTECTED]> writes:
>
> Manuel> "Erik Meijer" <[EMAIL PROTECTED]> wrote,
> >> [...] The lab is *sponsored* by Microsoft, but definitively not *at*
> >> Microsoft. I doubt there are any Linux boxes at Micro
On Sun, 6 Aug 2000, Mirko Pracht wrote:
> average x | null x= 0.0
What does you make thinking the average of an empty list is 0? Its'
obviously _|_, thus
average xs = sum xs / length xs
[which is inefficient, but simple]
Kili
--
_|_ is pronounced 'bottom', and is the greatest lower
Lokesh Sood schrieb:
dear sirs, I
have a problem to solve in haskell but i do not know how to go about it.
the problem is write
a haskell function for computing the average value of a list of numbers. I
am using Hug 98 for windows and I tried the following way: average
(x:xs) = s/l
I am designing a framework for handling text in various encodings.
Here is the current state of thoughts. Comments are welcome.
An important concept is a conversion from a sequence of characters
to another sequence of characters, usually in a different encoding.
Conversions are usually to Unicode
> "Manuel" == Manuel M T Chakravarty <[EMAIL PROTECTED]> writes:
Manuel> "Erik Meijer" <[EMAIL PROTECTED]> wrote,
>> > > The single Linux box we have in the Microsoft lab was severely hacked
>> from
>> > > the outside, they have moved to FreeBSD, which is supposed to be safer
There
is a nice way to solve this using _folds_. Basically, a fold over a list
is what you would get if you replaced every _:_by some binary operator (such as
_+_) and the end of the list by some constant (such as 0).
In
Haskell one pre-defined fold operator is "foldr" which stands for _fol
"Erik Meijer" <[EMAIL PROTECTED]> wrote,
> > > The single Linux box we have in the Microsoft lab was severely hacked
> from
> > > the outside, they have moved to FreeBSD, which is supposed to be safer
> (I
> > > hope so).
> >
> > Morale: Never trust a Linux box at Microsoft :-)
>
> The lab is *s
>average (x:xs) = s/l
>where
> s=sum(x:xs) && l=(x:xs)
>
>I am a beginner studying on my own. I would appreciate it if you could
explain what I should and should not do.
There are many errors in this small code snippet, I will just point out a
few:
(a) the
dear sirs,
I have a problem to solve in haskell but i do
not know how to go about it. the problem is
write a haskell function for computing the
average value of a list of numbers.
I am using Hug 98 for windows and I tried
the following way:
average (x:xs) = s/l
> > The single Linux box we have in the Microsoft lab was severely hacked
from
> > the outside, they have moved to FreeBSD, which is supposed to be safer
(I
> > hope so).
>
> Morale: Never trust a Linux box at Microsoft :-)
The lab is *sponsored* by Microsoft, but definitively not *at* Microsoft.
"Erik Meijer" <[EMAIL PROTECTED]> wrote,
> > I'm weird, but not a true 'CS' person. I run Linux -- do I
> > need to move to NetBSD?
>
> The single Linux box we have in the Microsoft lab was severely hacked from
> the outside, they have moved to FreeBSD, which is supposed to be safer (I
> hope s
11 matches
Mail list logo