Public Vars

Back

bit-flip (clj)

(source)

function

(bit-flip x n)
Flip bit at index n

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/bit-not [t/AnyInteger :-> t/AnyInteger]
cc/bit-and [t/AnyInteger (t/+ t/AnyInteger) :-> t/AnyInteger]
cc/bit-or [t/AnyInteger (t/+ t/AnyInteger) :-> t/AnyInteger]
cc/bit-xor [t/AnyInteger (t/+ t/AnyInteger) :-> t/AnyInteger]
cc/bit-and-not [t/AnyInteger (t/+ t/AnyInteger) :-> t/AnyInteger]
cc/bit-clear [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/bit-set [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/bit-flip [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/bit-test [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/bit-shift-left [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/bit-shift-right [t/AnyInteger t/AnyInteger :-> t/AnyInteger]
cc/unsigned-bit-shift-right [t/AnyInteger t/AnyInteger :-> t/AnyInteger]