3

I have

([[AA ww me bl qw 100] [AA ee rr aa aa 100] [AA qq rr aa aa 90]] [[CC ww me bl qw 100] [CC ee rr aa aa 67]])

and I need to remove the top nest so it becomes:

([AA ww me bl qw 100] [AA ee rr aa aa 100] [AA qq rr aa aa 90] [CC ww me bl qw 100] [CC ee rr aa aa 67])

Using flatten returns a list with just the inner elements which is not what I need. Thanks for helping..

2
  • use a sequence expression Commented Jun 18, 2015 at 14:23
  • ok, that sounds exciting but I have no idea what it is! Commented Jun 18, 2015 at 14:27

1 Answer 1

5

You can use concat to remove a single level of nesting. Since you have a sequence of sequences you need to use apply:

(apply concat
  ([[AA ww me bl qw 100] [AA ee rr aa aa 100] [AA qq rr aa aa 90]] [[CC ww me bl qw 100] [CC ee rr aa aa 67]]))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.