HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mythz
clojure-linq-examples
Clojure2013–2024
mythz / clojure-linq-examples

clojure-linq-examples

C#'s 101 LINQ Samples translated to Clojure

3Distinct people
7Mentions
0Explicit recommenders
164GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

C#'s 101 LINQ Samples translated to Clojure

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2013-10-30 12:31:28 UTC to 2024-10-18 15:35:55 UTC.

0122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC110
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC000
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

7 sources
I've also spent a bit of time with LISPs, when learning Clojure I ported the Clojure 101 LINQ Examples [1] and did appreciate a lot of niceties that Clojure brings with it where the additional syntax actually added to its readability, e.g. the usage of vector syntax for function params provided a welcomed visual separator from its implementation body. Basically all its additional syntax improves readability over a LISP's typical clumped sea of parens where you can more quickly discern different constructs from a glance which would otherwise take me a lot more time & effort trying to determine the boundaries of each expression whilst evaluating them in my head, effectively conveying that the minimal s-expression syntax that's optimal for the compiler isn't optimal for humans. So when it came time to implementing a .NET LISP [2], I adopted
Read the rest
much of Clojure's additional syntax for improved readability & interop with .NET APIs [3]. But you can only improve LISP's syntax so far, e.g. its Template libraries for HTML generation [4] make for horrible HTML DSL's which looks nothing like the HTML it's supposed to generate. The solution to overcome this was basically to not to use LISP for templates, instead create a multi-language scripting language [5] that embeds lisp into it allowing it to Combine strength's of all languages [6], e.g. use LISP for algorithms and Handlebars / JS Expressions for templating. The REPL is definitely one of its super powers which is one areas where it shines & basically the primary use-case where I still use it. I've created a live "watch" mode & deep integration with .NET libs that I use for discovery, e.g. run DB queries, call HTTP APIs, execute shell scripts, etc. [7]. It especially shines for being able to open a REPL session with a remote production .NET instance letting me inspect its live running state & invoke system functionality like querying its configured RDBMS, executing redis commands, send tweets, emails, etc [8], I've even got it to Live Script Unity objects in-game :) [9], which speaks to the power & elegance of LISP that's able to achieve so much with so little code. At the same time I don't think REPL-based programming is all that useful during normal development, you can execute encapsulated code fragments fine, but most of the time I'll need my whole environment constructed before being able to inspect it as I would when debugging, so I find it useful for opening a REPL session into a live running instance, but not using the REPL to construct the live instance. So for my dev workflow, static analysis & typing, great IDE, tooling + debugging is a lot more useful. [1] https://github.com/mythz/clojure-linq-examples [2] https://sharpscript.net/lisp/ [3] https://sharpscript.net/lisp/#net-interop [4] https://www.cliki.net/HTML%20template [5] https://sharpscript.net/docs/syntax#language-block-modifiers [6] https://sharpscript.net/docs/syntax#combine-strengths-of-all... [7] https://sharpscript.net/lisp/#run-and-watch-lisp-scripts [8] https://sharpscript.net/lisp/#techstacks-tcp-lisp-repl-demo [9] https://sharpscript.net/lisp/unity
In An Intuition for Lisp Syntax
As LINQ has been positioned as one of C#/.NET's biggest strengths their 101 LINQ Examples are a nice set of simple code examples to compare how well different languages fare against each other: - Swift https://github.com/mythz/swift-linq-examples - Kotlin https://github.com/mythz/kotlin-linq-examples - Java https://github.com/mythz/java-linq-examples (Java 1.7) - Clojure https://github.com/mythz/clojure-linq-examples - Dart https://github.com/mythz/dart-linq-examples - #Script LISP https://sharpscript.net/linq/restriction-operators?lang=lisp (Interactive, .NET Lisp) - #Script Code https://sharpscript.net/linq/restriction-operators?lang=code (Interactive, .NET JS-Like) - Elixir https://github.com/omnibs/elixir-linq-examples - Python https://github.com/rogerwcpt/python-linq-samples - Groovy https://gitlab.com/svkj/groovy-linq-samples Most l
Read the rest
anguages fare well in both verbosity and readability so I don't view LINQ as a major strength of C# anymore, it's just a well designed, typed query language with the USP of being able to capture and traverse an expression's AST which different LINQ providers can take advantage of by translating the intent of the query into a different DSL, most commonly used by ORMs to convert to SQL and execute the typed C# Expression logic on the RDBMS Server.
In LInQer – C# Integrated Queries ported to Javascript
Many other languages offer similar functional APIs for querying collections, here is C#'s 101 LINQ Examples rewritten in different languages: https://github.com/mythz/swift-linq-examples https://github.com/mythz/kotlin-linq-examples https://github.com/mythz/clojure-linq-examples https://github.com/mythz/java-linq-examples https://github.com/mythz/dart-linq-examples https://github.com/omnibs/elixir-linq-examples http://templates.servicestack.net/linq/ Java 8+ has since improved with their Streams API. The primary benefit that differentiates LINQ apart is that you can easily capture the Expression tree of the LINQ expression and rewrite its intent to apply to other sources, commonly used in LINQ -> SQL to provide a Typed Expression API for generating equivalent SQL to run on an RDBMS.
In How generics were added to .NET
Java's one of the worst language examples of using FP collections I've seen. Even with hindsight I still find this to be uglier and unnecessarily more verbose than it needs to be. E.g. same Example in Dart: class Article { String title; String author; List<String> tags; Article(this.title, this.author, this.tags); } Article getFirstJavaArticle() => articles.firstWhere((x) => x.tags.contains("Java")); List<Article> getAllJavaArticles() => articles.where((x) => x.tags.contains("Java")); List<String> getDistinctTags() => articles.expand((x) => x.tags).toSet().toList(); Can even be shorter without the Optional typing, but it's more readable to be explicit to have them. Dart benefits from having Collection and Stream mixins so you always get a rich API on Dart's collecti
Read the rest
ons. If anyone's interested to comparing FP collections in different languages, I've ported C# 101 LINQ examples in: - Swift https://github.com/mythz/swift-linq-examples - Clojure https://github.com/mythz/clojure-linq-examples - Dart https://github.com/dartist/101LinqSamples
In Java 8: No more loops

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.