How to end / Force a close to a program (in Clojure)

Hank picture Hank · Jul 16, 2009 · Viewed 12.4k times · Source

I am a pretty decent programmer in Java, however I am new to programming in Clojure.

In Java, to force an exit of a program, the code used is System.exit(0). Is there any equivalent to this code is Clojure?

Answer

Pavel Minaev picture Pavel Minaev · Jul 16, 2009

Given that part of the attractiveness of Clojure is that you can use Java class libraries, why not just do:

(System/exit 0)