Reputation: 531
I am wondering get a sublist in a list,like:
user=> (findsublst '(hello world (10 clock)))
(10 clock)
what function can I use or how to define the functioin findsublst. Thank you so much!
Upvotes: 0
Views: 1833
Reputation: 8088
With very little to go on, the following will return all first level list/sequences contained by the primary:
(filter seq? '(1 2 3 (4 5 6)))
=> ((4 5 6))
Upvotes: 4