DEV Community

Ivan Guerreschi
Ivan Guerreschi

Posted on

1

First post, first try Clojure

I explore the Clojure language

To program in Clojure i use Emacs with Cider, Lein and Ubuntu 20.04 LTS Operating System

Let's create a new project with the command: lein new app hello-world

Open the file hello-world/src/hello_world/core.clj with Emacs
The file contains the classic Hello World program

(ns hello-world.core
  (:gen-class))

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (println "Hello, World!"))

To run the program: lein run

This is the result:
Hello, World!

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay