Skip to content

Clojure docs and tutorials

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

  • Stats

Tag: seq

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

  • Clojure Record Heirarchy
  • Clojure Agents
  • Quick OOP Example
  • Razvan’s ‘defrecord’ Example
  • pr and prn

Quick Links

Remote REPL Quickstart

Categories

  • Basic Clojure
  • Books
  • Enterprise Clojure

Archives

  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • July 2020

Tags

:ignore apache Carmine Component count database Date datetime defn- defprotocol defrecord dependency destructuring email empty? in-ns JDK lein lifecycle luminus migrate Migratus Mount next.jdbc OOP pr print private prn pub/sub Redis REPL require seq Servlets SICP SimpleDateFormat smtp state TimeZone uberwar underscore UTC VS Code _

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.
© 2021 by T Gene Davis