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
    – Dax Fohl
    Jun 18, 2015 at 14:23
  • ok, that sounds exciting but I have no idea what it is!
    – Zuriar
    Jun 18, 2015 at 14:27

1 Answer 1

4

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.