For Business LeadersFor Technology ExecutivesHow we workWorkAboutBlog
Let's Talk
Tuesday, 16 December, 2025
Joel Kaasinen
Technology

A Christmas Present in Clojure

Post cover image

For Christmas 2025, I want to give you peace. The peace of not counting parens, just letting the words stream out from your keyboard, unfettered by requirements of structure, symmetry, unbothered by the tyranny of hierarchy.

Merry Christmas!

Here's pinoa, a way to write clojure without parentheses, in the spirit of Reverse Polish Lisp.

(require 'pinoa)
(pinoa/pinoa 1 2 + 3 *)
; => 9
(macroexpand-1 '(pinoa/pinoa 1 2 + 3 *))
; => (* (+ 1 2) 3)

The transformation is purely syntactic, so you can use control structures like if or even build anonymous functions!

(pinoa/pinoa [x] x 3 + fn 4 nil cons map)
; => (7)
(macroexpand-1 '(pinoa/pinoa [x] x 3 + fn 4 nil cons map))
; => (map (fn [x] (+ x 3)) (cons 4 nil))

Pinoa tries to deduce the correct arity of functions, but you can pick an explicit arity by adding a number:

(macroexpand-1 '(pinoa/pinoa :foo :bar str2 :quux str1 vector2))
; => (vector (str :foo :bar) (str :quux))
(pinoa/pinoa :foo :bar str2 :quux str1 vector2)
; => [":foo:bar" ":quux"]
(macroexpand-1 '(pinoa/pinoa :foo :bar str1 :quux str1 vector3))
; => (vector :foo (str :bar) (str :quux))
(pinoa/pinoa :foo :bar str1 :quux str1 vector3)
; => [:foo ":bar" ":quux"]

Finally,

(pinoa/pinoa [s [k v]] s "{" k name "}" str3 v str1
             clojure.string/replace3 fn
             "Have a {feeling} Christmas, {name}!"
             {} :feeling "rejuvenating" assoc :name "my friend" assoc
             reduce3)
; => "Have a rejuvenating Christmas, my friend!"

PS. previously...

Joel Kaasinen
Tuesday, 16 December, 2025

Related posts

High-Level AI Strategy into a Prioritized Investment Roadmap

by Tapio Nissilä
Cover Image for High-Level AI Strategy into a Prioritized Investment Roadmap

Three Levels of AI Impact

by Tapio Nissilä
Cover Image for Three Levels of AI Impact

A Guide for Technology Executives

by Tapio Nissilä
Cover Image for A Guide for Technology Executives
Read all stories

AI-First Engineering Growth Partner. We help technology leaders turn AI ambition into business results.

Github • LinkedIn • YouTube

Menu

  • Home
  • For Business Leaders
  • For Technology Executives
  • How we work
  • Work
  • About
  • Blog

Company

Business-id: 3374640-7
E-invoice: 003733746407
Operator: 003723327487 / Apix
metosin@skannaus.apix.fi

first.last@metosin.fi

Open Source

We maintain popular Clojure libraries used by thousands of developers:

Malli (Data validation) Reitit (Routing) Jsonista (JSON processing) Muuntaja (Content negotiation)

View on GitHub

Tampere • Helsinki • Jyväskylä • Oulu