Public Vars

Back

list? (clj)

(source)

function

(list? x)
Returns true if x implements IPersistentList

Examples

arohner/spectrum
(ns spectrum.core-specs
  (:require [clojure.core :as core]
            [clojure.spec.alpha :as s]
            [spectrum.core :as st]
            [spectrum.types :as t]
            [spectrum.util :refer [def-instance-predicate]]))

(s/fdef clojure.core/in-ns :args (s/cat :ns symbol?) :ret namespace?)
(s/fdef clojure.core/list :args (s/* any?) :ret list?)
typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

cc/list? (t/Pred (t/List t/Any))
#?@(:cljs [] :default [
cc/load-reader [java.io.Reader :-> t/Any]
])
rufoa/try-let
(ns try-let
	(:require
		[clojure.spec.alpha :as s]
		[clojure.core.specs.alpha :as cs]))


(s/def ::catch
	(s/and
		list?
		#(>= (count %) 3)
		#(= (first %) 'catch)))

(s/def ::else
	(s/and
		list?
		#(= (first %) 'else)))

(s/def ::finally
	(s/and
		list?
		#(= (first %) 'finally)))

(s/def ::then
	#(not (and
		(list? %)
		(#{'catch 'else 'finally} (first %)))))