Is there a simple / idiomatic way in Clojure to check if a given sequence is included in another sequence? Sort of:
(subseq? [4 5 6] (range 10)) ;=> true
(subseq? [4 6 5] (range 10)) ;=> false
(subseq? "hound" "greyhound") ;=> true
(where subseq?is the theoretical function that will do what I describe)
It seems that there is no such function in the kernel or other Clojure libraries ... provided that true, is there a relatively simple way to implement such a function?
source
share