Table of Contents

split-at

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

Syntax

(split-at num seq1)

Example

(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)]

Refs