Sdaas / clojure-learn

Exercises that I am doing when learning clojure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clojure-learn

TODO Description

List of Modules

Using the Gorilla Repl

  • Add :plugins [[lein-gorilla "0.4.0"]] to project.clj
  • Run lein gorilla to launch the repl

Adding a new module

To add a new module called XXX

Code

  • Add a new file src/XXX.clj
  • At the top of the file, add the name space for this module
(ns clojure-learn.XXX (:gen-class))

Test Cases

  • Add a new file test/XXX_test.clj
  • At the top of the file add the namespace of the test and all the dependencies
(ns clojure-learn.XXX-test
  (:require [clojure.test :refer :all]
            [clojure-learn.bigint :refer :all]))

To run all tests in project

lein test

To run all tests for XXX

lein test clojure-learn.XXX-test

To run only a specific test

lein test :only clojure-learn.bigint-test/name_of_the_test

References

Profling Clojure Code https://torsten.io/stdout/how-to-profile-clojure-code/ using (VisualVM)[https://visualvm.github.io/]

HackerRank Notes

The HackerRank Environment for Clojure imposes a 8second time limit for execution, and a maximum memory consumption of 512MB

TODO

General

  • Support for debug printing

bigint

  • SUBTRACT works only for +ve numbers and where v1 > v2
  • no support for MULT, DIV, or MOD

About

Exercises that I am doing when learning clojure.

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%