<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">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:</div><div class="">Prelude> :t maximumBy</div><div class="">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)</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Best regards,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Daniel van de Ghinste</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div></div></div><div><blockquote type="cite" class=""><div class="">On 22 May 2020, at 20:20, Alexander Chen <<a href="mailto:alexander@chenjia.nl" class="">alexander@chenjia.nl</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family:Arial; font-size:13px;" class="">Hi,<div class=""><br class=""></div><div class="">I want to re-write a function maximumBy (its an assignment).</div><div class=""><br class=""></div><div class="">However, I don't get how it works.</div><div class=""><br class=""></div><div class="">>maximumBy compare [1,53,9001, 10]</div><div class="">9001</div><div class=""><br class=""></div><div class="">but what does it actually do to get there? </div><div class=""><br class=""></div><div class="">thanks in advance.</div><div class=""><br class=""></div><div class="">best,<br class=""><br class=""><div class=""><div style="font-family:Arial; font-size:13px;" class=""><br class=""></div></div></div></div>_______________________________________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br class=""></div></blockquote></div><br class=""></div></body></html>