pastebin

Paste wd, #HeD -- näytä pelkkänä tekstinä -- uusi tämän pohjalta

Värjäys: Tyyli: ensimmäinen rivinumero: Tabin korvaus:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
maxBy :: (a -> Int) -> a -> a -> a
maxBy measure a b = max $ (measure a) (measure b)

 Couldn't match expected type Int -> a0 with actual type Int
 The function measure is applied to two arguments,
      but its type a -> Int has only one
      In the second argument of ($), namely (measure a) (measure b)
      In the expression: max $ (measure a) (measure b)
   |
31 | maxBy measure a b = max $ (measure a) (measure b)
   |                           ^^^^^^^^^^^^^^^^^^^^^^^