[Haskell-cafe] Producing MinimumValue
Joachim Breitner
mail at joachim-breitner.de
Wed Jul 18 17:24:46 EDT 2007
Hi,
Am Mittwoch, den 18.07.2007, 13:42 -0700 schrieb Alexteslin:
> I am trying to define a function as part of the exercises that gives a
> result of a minimum value of the input list of ints. Such as this:
>
> minimumValue :: [Int] -> Int
> minimumValue ns ...
>
> using either filter or map functions but Not foldr1, because the exercise
> precedes the section on foldr1.
> I am confused because using filter - it generates a list on some constraint
> function for each element.
>
> Any hints will be very appreciated. Thank you
Are you allowed to define the function without any of filter or map,
just yourself?
minimumValue [a] = ...
minimumValue (x:xs) = .. x .. minimumValue xs ..
Greetings,
Joachim
--
Joachim Breitner
e-Mail: mail at joachim-breitner.de
Homepage: http://www.joachim-breitner.de
ICQ#: 74513189
More information about the Haskell-Cafe
mailing list