You're viewing version 1.2.0 of aset-boolean. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

aset-boolean

clojure.core

  • (aset-boolean array idx val)
  • (aset-boolean array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of boolean. Returns val.

1 Example top

  • ;; create an array of 10 booleans and set one value to true
    ;; using aset-boolean
    
    user=> (def bs (boolean-array 10))
    #'user/bs
    user=> (vec bs)
    [false false false false false false false false false false]
    user=> (aset-boolean bs 2 true)
    true
    user=> (vec bs)
    [false false true false false false false false false false]
    user=>
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3031 top

(def-aset
  ^{:doc "Sets the value at the index/indices. Works on arrays of boolean. Returns val."
    :added "1.0"}
  aset-boolean setBoolean boolean)
Vars in clojure.core/aset-boolean: boolean
Used in 0 other vars

Comments top

No comments for aset-boolean. Log in to add a comment.