this post was submitted on 18 Oct 2024
2 points (100.0% liked)

Clojure programming language discussion

453 readers
1 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 4 years ago
MODERATORS
 

3 coin flip Monte Carlo simulation in Clojure

https://clojure-diary.gitlab.io/2024/10/18/3-coin-flip-monte-carlo-simulation-in-clojure.html

Code ;; three_coin_toss_montecarlo.clj ;; Montecarlo simulation of 3 coin toss (defn toss-thrice [] (repeatedly 3 #(rand-nth ["H" "T"]))) (defn samples [num] (repeatedly num toss-thrice)) (defn nil-to-zero [x] (if (nil? x) 0 x)) (defn...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

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