Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for guards in Argon #36

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

SarthakKumar1997
Copy link
Contributor

As per issue #35, adds functionality to detect guarded statements in Haskell. For example, the below function now displays the correct cyclomatic complexity of 4, instead of 2:

nthElement :: [a] -> Int -> Maybe a 
nthElement [] a = Nothing
nthElement (x:xs) a | a <= 0 = Nothing
                    | a == 1 = Just x
                    | a > 1 = nthElement xs (a-1)

@rubik
Copy link
Owner

rubik commented Feb 21, 2019

Thanks, nice work!

@SarthakKumar1997
Copy link
Contributor Author

No worries :)

@rubik rubik merged commit 66f5361 into rubik:master Feb 21, 2019
@SarthakKumar1997 SarthakKumar1997 deleted the add-guards-support branch March 1, 2019 13:01
@SarthakKumar1997 SarthakKumar1997 restored the add-guards-support branch March 31, 2019 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants