Skip to content

Commit

Permalink
# ADD - haskell config
Browse files Browse the repository at this point in the history
  • Loading branch information
morishjs committed Sep 14, 2019
1 parent fe628dd commit fb1e938
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.history
.stack-work
.vscode/phoityne.log
.vscode/phoityne.log
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"internalConsoleOptions": "openOnSessionStart",
"workspace": "${workspaceRoot}",
"startup": "/Users/junsukpark/AlgoDaily/src/test.hs",
"startupFunc": "main",
"startupArgs": "0",
"startupFunc": "fib",
"startupArgs": "3",
"stopOnEntry": false,
"mainArgs": "",
"ghciPrompt": "H>>= ",
Expand Down
5 changes: 5 additions & 0 deletions src/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ mergesort arr =
sortedRight = mergesort right
in merge sortedLeft sortedRight

fib :: (Ord a, Num a) => a -> a
fib 0 = 0
fib 1 = 1
fib n = fib n-1 + fib n-2

main = do putStrLn "Hello World"

0 comments on commit fb1e938

Please sign in to comment.