Public Vars

Back

seqable? (clj)

(source)

function

(seqable? x)
Return true if the seq function is supported for x

Examples

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))))

(t/defalias
  ^{:doc "A type that returns true for clojure.core/seqable?, with members x."
    :forms '[(Seqable x)]}
  t/Seqable
  (t/TFn [[x :variance :covariant]]
         (t/Nilable
           #?(:clj (clojure.lang.Seqable (t/NilableNonEmptySeq x))
              :cljs (cljs.core/ISeqable (t/NilableNonEmptySeq x))))))

(t/defalias
  ^{:doc "A type that returns true for clojure.core/seqable?."
    :forms '[AnySeqable]}
  t/AnySeqable
  (t/Seqable t/Any))

cc/seqable? (t/Pred t/AnySeqable)
cc/indexed? (t/Pred (t/Indexed t/Any))
cc/inst-ms [:-> t/Int]
cc/inst? (t/Pred cc/Inst)
cc/uuid? (t/Pred t/UUID)
cc/random-uuid [:-> t/UUID]
cc/parse-uuid [t/Str :-> (t/Option t/UUID)]
cc/uri? (t/Pred t/URI)
cc/tagged-literal? (t/Pred clojure.lang.TaggedLiteral)
cc/reader-conditional? (t/Pred clojure.lang.ReaderConditional)