Public Vars

Back

neg? (clj)

(source)

function

(neg? num)
Returns true if num is less than zero, else false

Examples

clj-kondo/clj-kondo
(ns cond-without-else1
  (:refer-clojure :exclude [cond])
  (:require [clojure.core :as c]))

(c/cond
  (neg? n) "negative"
  :default "positive")

(cond
  (neg? n) "negative"
  :default "positive")
clj-kondo/clj-kondo
(ns cond-without-else1
  (:refer-clojure :exclude [cond])
  (:require [clojure.core :as c]))

(c/cond
  (neg? n) "negative"
  :default "positive")

(cond
  (neg? n) "negative"
  :default "positive")
clj-kondo/clj-kondo
(ns cond-without-else1
  (:refer-clojure :exclude [cond])
  (:require [clojure.core :as c]))

(c/cond
  (neg? n) "negative"
  :default "positive")

(cond
  (neg? n) "negative"
  :default "positive")
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/pos? [t/Num :-> t/Bool]
cc/neg? [t/Num :-> t/Bool]
borkdude/flycheck-clj-kondo
(ns cond-without-else1
  (:refer-clojure :exclude [cond])
  (:require [clojure.core :as c]))

(c/cond
  (neg? n) "negative"
  :default "positive")

(cond
  (neg? n) "negative"
  :default "positive")