Public Vars

Back

*3 (clj)

(source)

variable

bound in a repl thread to the third most recent value printed

Examples

uncomplicate/fluokitten
(ns uncomplicate.fluokitten.articles.fluokitten-extensions-clojure-core-test
  "These expressions are used as examples in the
    Fluokitten Extensions of Clojure Core
    article at the Fluokitten web site."
  (:use [uncomplicate.fluokitten jvm core test utils])
  (:require [clojure.core.reducers :as r])
  (:use [midje.sweet :exclude [just]]))

 (let [+*3+2 (fmap + (partial * 3) (partial + 2))
       **3+2 (fmap * ((curry *) 3) ((curry +) 2))]

   (+*3+2 7 3 1) => 76

   (**3+2 7 3 1) => 819

   ((**3+2) 2) => 24
   ((+*3+2) 2) => (throws ClassCastException)))
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/*1 t/Any
cc/*2 t/Any
cc/*3 t/Any
cc/*e #?(:cljs t/Any :default (t/U nil Throwable))
#?@(:cljs [] :default [
cc/*agent* (t/U nil (t/Deref t/Any) #_(t/Agent t/Any))
cc/*allow-unresolved-vars* t/Any
cc/*data-readers* (t/Map t/Sym t/AnyVar)
cc/*default-data-reader-fn* (t/U nil [t/Any t/Any :-> t/Any])
cc/*fn-loader* t/Any
cc/*math-context* t/Any
cc/*source-path* t/Str
cc/*use-context-classloader* t/Any
])
cc/*assert* t/Any
clojure-numerics/expresso
(ns numeric.expresso.test-core
  (:use numeric.expresso.core)
  (:use [clojure.test :exclude [test-vars]])
  (:require [numeric.expresso.types :as types]
            [numeric.expresso.protocols :as protocols]
            [clojure.core.logic :as logic]))

;;see also test_parse.clj
(deftest test-parse-expression
  (is (= (ex (+ 1 2 3)) (parse-expression "1 + 2 + 3")))
  (is (= (ex (+ 1 (* 2 (** 3 4)) 5))
         (parse-expression "1+2*3**4+5")))
  (is (= (ex (= (+ (** (sin x) 2) (** (cos x) 2)) 1))
         (parse-expression "sin(x)**2 + cos(x)**2 = 1"))))
hyperfiddle/rcf
(ns hyperfiddle.rcf.example-test
  (:require [clojure.core.async :refer [chan >! go go-loop <! timeout close!]]
            [hyperfiddle.rcf :as rcf :refer [tests tap % with]]
            [missionary.core :as m]))

(tests
 "REPL bindings work"
 (inc 1) := 2
 (dec *1) := 1
 
 (tests 1 2 3 *3 := 1, *2 := 2, *1 := 3))