open:split-at

split-at

Splits the sequence of items into two parts. A location is specified at which the split should happen.

(split-at num seq1)

(ns clojure.examples.example
   (:gen-class))

;; This program displays Hello World
(defn Example []
   (def seq1 (seq [5 4 3 2 1]))
   (println (split-at 2 seq1)))
(Example)

Output

[(5 4) (3 2 1)]

  • open/split-at.txt
  • 마지막으로 수정됨: 2021/11/23 01:15
  • 저자 127.0.0.1