Last active
October 13, 2015 19:38
-
-
Save dimitri-xyz/f0819c947ecd386b84d6 to your computer and use it in GitHub Desktop.
Merging 2 branches - function definition does NOT depend on constant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- base | |
------- | |
c :: Int | |
c = 5 | |
plusone :: Int -> Int | |
plusone x = x + 1 | |
main = putStrLn $ "the total is: " ++ show (plusone c) | |
-- branch A | |
----------- | |
c :: Int | |
c = 6 -- New Value | |
plusone :: Int -> Int | |
plusone x = x + 1 | |
main = putStrLn $ "the total is: " ++ show (plusone c) | |
-- branch B | |
----------- | |
c :: Int | |
c = 5 | |
plusone :: Int -> Int | |
plusone 6 = -3 -- New Definition | |
plusone x = x + 1 | |
main = putStrLn $ "the total is: " ++ show (plusone c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment