Fork, Commit, Merge - Easy Issue (Clojure) #983
Labels
clojure
easy
first-contributor
first-contributors
good first issue
Good for newcomers
help wanted
Extra attention is needed
up-for-grabs
Fork, Commit, Merge - Easy Issue (Clojure)
Create a Simple Number Addition Function in Clojure
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
Description:
In this task, you're expected to implement a simple Clojure function that adds two numbers and prints the result in a formatted string.
Requirements:
Implement a function named add-numbers that:
Example:
For input values of 3 and 5, your function should print:
To get started, open the
tasks/clojure/easy/add-numbers/src/add_numbers
directory from the root of the project.After that, open the
core.clj
file to start implementing the solution!To test the program, you can use REPL with Calva VS Code extension. If you don't have them installed, go check out the Installing Clojure section in README.md.
To run the program, use Ctrl+Shift+C and after that Ctrl+Shift+J to open Project Type/Connect Sequence on top of the VS Code. From there, select
fork-commit-merge/tasks/clojure/easy/add-numbers
and press Enter.After that you need to select
Leiningen
and press Enter.Now the REPL server is running.
On the right side of the screen you should now see
output.calva.repl
file opened, where under this textclj꞉add-numbers.core꞉>
you can add commands.Write command
(add-numbers 3 5)
and press Enter.If the function works like expected, you should now see
The sum of 3 and 5 is: 8
text, which means you are ready to make a pull request!To work with this issue, you need to have Clojure and Leiningen installed to your local machine.
Check out README.md for more instructions of installing Clojure and Leiningen and how to make a pull request.
Feel free to ask any questions here if you have some problems!
Also, kindly give this project a star to enhance its visibility for new developers!
The text was updated successfully, but these errors were encountered: