Skip to content

Clojure docs and tutorials

Clojure programming language docs and tutorials. Welcome to modern functional programming.

  • Stats

Tag: count

Checking for Empty Seqs in Clojure

On: July 28, 2020July 28, 2020 By: cljdude

When coming from other languages, devs often think the best way to check for an empty vector or other sequence in Clojure is to either check the count  is less than one or check for (not (empty? some-seq)) . Both will work, but are not idiomatic, meaning “Your newbness is showing.” Continue reading “Checking for Empty Seqs in Clojure” →

Category: Basic Clojure Tagged count, empty?, seq
Leave a comment/
"The glory of God is intelligence, or, in other words, light and truth."   -D&C 93:36

Recent Posts

  • Learn Clojure Quick
  • Clojurcises: hash-map
  • File Dialogs in Clojure
  • Clojure JOptionPane
  • Clojure Example Swing App

Quick Links

Remote REPL Quickstart
Install Clojure and Lein

Categories

  • Basic Clojure
  • Books
  • Enterprise Clojure
  • UI

Archives

  • November 2023
  • September 2021
  • April 2021
  • February 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • July 2020

Tags

:ignore ActionListener agent apache BorderLayout Carmine clojurcises concurrency constructor ContentPane datetime defmethod defmulti defprotocol defrecord derive docker email FileNameExtensionFilter invokeAndWait invokeLater java JFileChooser JFrame JOptionPane lein luminus migrate Migratus OOP polymorphism print println Redis REPL send send-off shutdown-agents SICP slurp smtp swing threads web app \n

Apache License

Copyright 2020 T Gene Davis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use code on this website except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Authors of code and quotes used with permission are owned by the original authors. T Gene Davis makes no claims of ownership of their code and quotes.
© 2025 by T Gene Davis