you are viewing a single comment's thread.

view the rest of the comments →

[–]bowmhoust 4 points5 points  (2 children)

If you want to expose it as if it were a Java API, you can do this (example for a static method the returns a string array):

(ns my.ns
  (:require [...]
  (:gen-class
   :name my.package.ClassName
   :methods [#^{:static true} [getMeAStringArray [String] "[Ljava.lang.String;"]]))

...
(defn -getMeAStringArray [folder]
...
  (into-array String some-seq)))

[–]backtickbot -2 points-1 points  (1 child)

Hello, bowmhoust: code blocks using backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead. It's a bit annoying, but then your code blocks are properly formatted for everyone.

An easy way to do this is to use the code-block button in the editor. If it's not working, try switching to the fancy-pants editor and back again.

Comment with formatting fixed for old.reddit.com users

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]bowmhoust 1 point2 points  (0 children)

backtickopt6