HomeServicesExpertiseOpen source supportAboutStoryReferencesCareerInsightsContact
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
More

Contact

HomeServicesExpertiseOpen source supportAboutStoryReferencesCareerInsightsContact

Tampere
Hämeenkatu 13 A 5
33100 Tampere

Helsinki
Kalevankatu 13, 3rd floor
00100 Helsinki

Jyväskylä
Väinönkatu 30, 5th floor
40100 Jyväskylä

Oulu
Kirkkokatu 4 A 51
90100 Oulu

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

first.last@metosin.fi

Github
Instagram
LinkedIn
YouTube

Cookie settings