feat: Added Haskell and Go.

This commit is contained in:
Spencer Brower
2022-07-04 18:49:33 -04:00
parent dffa0a4c1b
commit 6ac20afead
19 changed files with 1346 additions and 0 deletions

19
haskell/app/Main.hs Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env stack
-- stack runghc
import Risk
maximum' :: Ord a => [a] -> a
maximum' = foldr1 (\x y ->if x >= y then x else y)
maximum'' :: Ord a => [a] -> a
maximum'' [x] = x
maximum'' (x:x':xs) = maximum' ((if x >= x' then x else x'):xs)
a :: [Int]
a = [3,5,8,6]
main :: IO ()
main = print $ maximum'' a
-- main = print $ possibleOutcomes 3 3
-- main = print $ Result(3, 5) + Result(1, 2)