Joe Crawley
Joe Crawley

Reputation: 725

combining 2 lists in clojure

I'm trying to make a new list that is made up of 2 pre-existing lists. Basically, if a is a list and b is a list, I want to make List c which is the elements of a followed by the elements of b. Any help is appreciated!

Upvotes: 6

Views: 244

Answers (1)

zvez
zvez

Reputation: 818

You are looking for concat function:

(concat a b)

For example:

(concat '(1 2) '(2 3 4))
:> (1 2 2 3 4)

Upvotes: 10

Related Questions