Public Vars

Back

drop-while (clj)

(source)

function

(drop-while pred) (drop-while pred coll)
Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false. Returns a stateful transducer when no collection is provided.

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/take-while (t/All [x y] (t/IFn [[x :-> t/Any] :-> (t/Transducer x x)]
                                  [[x :-> t/Any] (t/Seqable x) :-> (t/ASeq x)]))
cc/drop-while (t/All [x] (t/IFn [[x :-> t/Any] :-> (t/Transducer x x)]
                                [[x :-> t/Any] (t/Seqable x) :-> (t/ASeq x)]))
ReactiveX/RxClojure
(ns rx.lang.clojure.core-test
  (:require [rx.lang.clojure.core :as rx]
            [rx.lang.clojure.blocking :as b]
            [rx.lang.clojure.future :as f]
            [clojure.test :refer [deftest is testing are]]))

(deftest test-drop-while
  (is (= (into [] (drop-while even? [2 4 6 8 1 2 3]))
         (b/into [] (rx/drop-while even? (rx/seq->o [2 4 6 8 1 2 3])))))
  (is (= (into [] (drop-while even? [2 4 6 8 1 2 3]))
         (b/into [] (rx/drop-while even? (rx/seq->o [2 4 6 8 1 2 3]))))))
hraberg/shen.clj
;; src/shen/overwrite.clj
(ns shen
  (:use [shen.primitives])
  (:require [clojure.core :as c])
  (:refer-clojure :only []))

(defun macroexpand (V510)
  (let Y (shen-compose (c/drop-while c/nil?
                                     (c/map #(c/when-let [m (c/ns-resolve 'shen %)] @m)
                                            (value '*macros*))) V510)
       (if (= V510 Y) V510 (shen-walk macroexpand Y))))