Public Vars

Back

simple-ident? (clj)

(source)

function

(simple-ident? x)
Return true if x is a symbol or keyword without a namespace

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

cc/integer? (t/Pred t/AnyInteger)
cc/int? (t/Pred #?(:clj (t/U Long
                             Integer
                             Short
                             Byte)
                   :cljs (t/U t/CLJSInteger
                              goog.math.Integer
                              goog.math.Long)))
cc/pos-int? [t/Any :-> t/Bool
             :filters {:then (is #?(:clj (t/U Long
                                              Integer
                                              Short
                                              Byte)
                                    :cljs (t/U t/CLJSInteger
                                               goog.math.Integer
                                               goog.math.Long)) 0)}]
cc/neg-int? [t/Any :-> t/Bool
             :filters {:then (is #?(:clj (t/U Long
                                              Integer
                                              Short
                                              Byte)
                                    :cljs (t/U t/CLJSInteger
                                               goog.math.Integer
                                               goog.math.Long)) 0)}]
cc/nat-int? [t/Any :-> t/Bool
             :filters {:then (is #?(:clj (t/U Long
                                              Integer
                                              Short
                                              Byte)
                                    :cljs (t/U t/CLJSInteger
                                               goog.math.Integer
                                               goog.math.Long)) 0)}]
cc/number? (t/Pred t/Num)
cc/double? (t/Pred #?(:clj Double
                      :cljs t/Num))
cc/float? (t/Pred #?(:clj (t/U Double Float)
                     :cljs t/Num))
cc/ident? (t/Pred t/Ident)
cc/simple-ident? [t/Any :-> t/Bool :filters {:then (is t/Ident 0)}]
cc/qualified-ident? [t/Any :-> t/Bool :filters {:then (is t/Ident 0)}]
cc/simple-symbol? [t/Any :-> t/Bool :filters {:then (is t/Sym 0)}]
cc/qualified-symbol? [t/Any :-> t/Bool :filters {:then (is t/Sym 0)}]
cc/simple-keyword? [t/Any :-> t/Bool :filters {:then (is t/Kw 0)}]
cc/qualified-keyword? [t/Any :-> t/Bool :filters {:then (is t/Kw 0)}]
cc/var? (t/Pred t/AnyVar)