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

Refactor code to use Clojure idioms for clarity #159

Closed
wants to merge 12 commits into from
Closed

Conversation

SmetDenis
Copy link
Owner

No description provided.

Denis Smet added 12 commits February 10, 2024 02:34
This commit introduces the `lein-kibit` plugin to the `project.clj` file. The addition of this plugin aids in static code analysis for Clojure, thus improving the overall code quality in the project.
Revised the code in SICP part 1 exercises and book material to use more idiomatic Clojure functions for mathematical operations. The changes include using inc and dec for incrementing and decrementing, using pos?, zero?, and neg? for comparison instead of raw mathematical operators, and simplifying arithmetic expressions. These changes aim at improving code readability and efficiency.
The Clojure idioms 'inc', 'dec', 'zero?', and 'neg?' were used to replace '+', '-', '=' and '<' functions for clarity and readability. This idiomatic approach is part of a wider refactor and can help to improve the quality, maintainability, and readability of our code.
Several arithmetic operations, including '+', '-' and '=', were replaced with Clojure's built-in functions like 'inc', 'dec', 'zero?', and 'pos?'. This change aims to improve code readability and maintainability by using clearer and more idiomatic language functions.
Several arithmetic operations, including '+', '-' and '=', were replaced with Clojure's built-in functions like 'inc', 'dec', 'zero?', and 'pos?'. This change aims to improve code readability and maintainability by using clearer and more idiomatic language functions.
@SmetDenis SmetDenis closed this Feb 10, 2024
@SmetDenis SmetDenis deleted the kibit branch February 10, 2024 15:19
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.

1 participant