DF
Size: a a a
DF
DL
DF
KC
DF
;; давайте подитожим
;; Returns true if x implements IPersistentCollection
(coll? []) ;; => true
(coll? (range 1)) ;; => true - (range ...) returns PersistentList or similar
(coll? 0) ;; => false
;; Achtung!
(coll? (to-array [])) ;; => false - (to-array coll) is Object[] but not instance of IPersistentCollection
;; If the collection is empty, returns nil. (seq nil) returns nil.
;; ...works on Strings, native Java arrays and any objects that implement Iterable
(seq []) ;; => nil - falsy
(seq nil) ;; => nil - falsy
(seq (range 0)) ;; => nil - falsy
(seq (range 1)) ;; => (0) - truthy
;; Achtung!
(seq "ABC") ;; => (\A \B \C) - truthy
(seq 0) ;; throws IllegalArgumentException - java.lang.Long is not instance of ISeq
;; Return true if x implements ISeq
(seq? 0) ;; false
(seq? (range 0)) ;; true
(seq? []) ;; false
;; Achtung!
(seq? (seq [])) ;; false
(seq? (seq [nil])) ;; true
;; Return true if the seq function is supported for x
(seqable? 0) ;; false
(seqable? (range 0)) ;; true
;; Achtung! empty colls are seqable
(seqable? []) ;; true
(seqable? #{}) ;; true
(seqable? {}) ;; true
(seqable? "") ;; true
;; Returns true if coll implements Sequential
(sequential? []) ;; true
(sequential? '()) ;; true
(sequential? (range 0)) ;; true
(sequential? 0) ;; false
(sequential? nil) ;; false
;; Achtung!
(sequential? #{}) ;; false - set is not Sequential
(sequential? {}) ;; false - map is not Sequential
(= '() []) ;; true
VP
VP
;; давайте подитожим
;; Returns true if x implements IPersistentCollection
(coll? []) ;; => true
(coll? (range 1)) ;; => true - (range ...) returns PersistentList or similar
(coll? 0) ;; => false
;; Achtung!
(coll? (to-array [])) ;; => false - (to-array coll) is Object[] but not instance of IPersistentCollection
;; If the collection is empty, returns nil. (seq nil) returns nil.
;; ...works on Strings, native Java arrays and any objects that implement Iterable
(seq []) ;; => nil - falsy
(seq nil) ;; => nil - falsy
(seq (range 0)) ;; => nil - falsy
(seq (range 1)) ;; => (0) - truthy
;; Achtung!
(seq "ABC") ;; => (\A \B \C) - truthy
(seq 0) ;; throws IllegalArgumentException - java.lang.Long is not instance of ISeq
;; Return true if x implements ISeq
(seq? 0) ;; false
(seq? (range 0)) ;; true
(seq? []) ;; false
;; Achtung!
(seq? (seq [])) ;; false
(seq? (seq [nil])) ;; true
;; Return true if the seq function is supported for x
(seqable? 0) ;; false
(seqable? (range 0)) ;; true
;; Achtung! empty colls are seqable
(seqable? []) ;; true
(seqable? #{}) ;; true
(seqable? {}) ;; true
(seqable? "") ;; true
;; Returns true if coll implements Sequential
(sequential? []) ;; true
(sequential? '()) ;; true
(sequential? (range 0)) ;; true
(sequential? 0) ;; false
(sequential? nil) ;; false
;; Achtung!
(sequential? #{}) ;; false - set is not Sequential
(sequential? {}) ;; false - map is not Sequential
(= '() []) ;; true
AB
libpmem
(nvram).IR
A
AC
EZ
IR
С
IR
IR
С
VP
VP