Public Vars

Back

replicate (clj)

(source)

function

(replicate n x)
DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.

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/sort (t/All [x] [(t/I Comparator [x x :-> t/AnyInteger]) :? (t/Seqable x) :-> (t/ASeq x)])
cc/sort-by (t/All [a] [[a :-> Number] :? (t/Seqable a) :-> (t/ASeq a)])
cc/replicate (t/All [a] [t/AnyInteger a :-> (t/ASeq a)])