this post was submitted on 26 Feb 2025
0 points (50.0% liked)

Clojure programming language discussion

525 readers
12 users here now

Clojure is a Lisp that targets JVM and JS runtimes

Finding information about Clojure

API Reference

Clojure Guides

Practice Problems

Interactive Problems

Clojure Videos

The Clojure Community

Clojure Books

Tools & Libraries

Clojure Editors

Web Platforms

founded 5 years ago
MODERATORS
 

Extending Java Class in Clojure

https://clojure-diary.gitlab.io/2025/02/26/extending-java-class-in-clojure.html

Code ;; extend_java_class.clj (defprotocol Wishy (wish [this])) (extend-type String Wishy (wish [this] (str "Hello " this "!"))) (wish "Karthik") (wish 1) ; puts out an error (extend-type java.lang.Long Wishy (wish [this] (str...

#clojure #clj #cljs [email protected] @clojure

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here