Explorar o código

Add a foladble function for maximum

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
bd7bfcc5b4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      fold.hs

+ 3 - 0
fold.hs

@@ -2,3 +2,6 @@
 
 fsum::Num a => [a] -> a
 fsum = foldl (+) 0
+
+fmax::(Ord a, Num a) => [a] -> a
+fmax = foldl max 0