nfirst

clojure.core

  • (nfirst x)
Same as (next (first x))

1 Example top

  • user=> (nfirst [])
    nil 
    
    user=> (nfirst ['(a b c) '(b a c) '(c b a) '(a c b)])
    (b c)
    
    user=> (nfirst {:a 1, :b 2, :c 3, :d 4})
    (1)
    
    user=> (nfirst #{1 2 3})
    java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer (NO_SOURCE_FILE:0)
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/next

    Returns a seq of the items after the first. Calls seq on its argume

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:103 top

(def
 ^{:doc "Same as (next (first x))"
   :arglists '([x])
   :added "1.0"
   :static true}
 nfirst (fn ^:static nfirst [x] (next (first x))))
Vars in clojure.core/nfirst:
Used in 0 other vars

Comments top

No comments for nfirst. Log in to add a comment.