Henning Thielemann wrote:
On Thu, 8 May 2008, Madoc wrote:
minValue = 0::Int
maxValue = 1000::Int
normalize a | a < minValue = minValue
| a > maxValue = maxValue
| otherwise = a
normalize' = min maxValue . max minValue
There is a curiosity here. The functions normal
2008/5/8 Madoc <[EMAIL PROTECTED]>:
> Hello,
>
> I am just learning Haskell. Now, I encountered something that I cannot
> solve by myself. Your advice will be greatly appreciated.
>
> Given a list of numbers, I want to modify each of those numbers by adding a
> random offset. However, each such mo
On Thu, 8 May 2008, Madoc wrote:
Given a list of numbers, I want to modify each of those numbers by adding a
random offset. However, each such modified number shall stay within certain
bounds, given by the integers minValue and maxValue. After that, I want to
continue computation with the resul
2008/5/8 Thomas Dinsdale-Young <[EMAIL PROTECTED]>:
> Madoc wrote:
>
> Given a list of numbers, I want to modify each of those numbers by adding a
>
> random offset. However, each such modified number shall stay within certain
>
> bounds, given by the integers minValue and maxValue. After that, I
Madoc wrote:
Given a list of numbers, I want to modify each of those numbers by adding a
random offset. However, each such modified number shall stay within certain
bounds, given by the integers minValue and maxValue. After that, I want to
continue computation with the resulting list of type [Int
Madoc wrote:
Given a list of numbers, I want to modify each of those numbers by adding a
random offset. However, each such modified number shall stay within certain
bounds, given by the integers minValue and maxValue. After that, I want to
continue computation with the resulting list of type [Int
Hello,
I am just learning Haskell. Now, I encountered something that I cannot solve
by myself. Your advice will be greatly appreciated.
Given a list of numbers, I want to modify each of those numbers by adding a
random offset. However, each such modified number shall stay within certain
bounds