Daniel van de Ghinste (Lord_Luvat)
danielvandeghinste at gmail.com
Fri May 22 18:33:33 UTC 2020
Maybe I’m on a different version, but I don’t see a function called maximumBy in my base Prelude. Can you give us a type signature for the function? If you’re not sure how to do that just type:
Prelude> :t maximumBy
In your ghci interpreter and it should return the type signature of whatever you have after ‘:t ‘ (this works for compound expressions too if you put them in brackets)
Perhaps maximumBy is what you’re meant to call your rewrite of the existing function I see called ‘maximum’ (seems to do the same thing). Let me know if thats the case and I can explain how it works.
Daniel van de Ghinste
> On 22 May 2020, at 20:20, Alexander Chen <alexander at chenjia.nl> wrote:
> I want to re-write a function maximumBy (its an assignment).
> However, I don't get how it works.
> >maximumBy compare [1,53,9001, 10]
> but what does it actually do to get there?
> thanks in advance.
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners