Find Permutations of String in Scala
correct - As far as I can tell, yes.
concise - A filter() followed by a .length (or .size) can be simplified:
large.sliding(small.length).count(_.diff(small).isEmpty)
fast - Could be faster, but it wouldn't be as concise.

Consider the following: findPermutations(&quot;abcxcba&quot;, &quot;cab&quot;)
Under the current design that would be 5 invocations of _.diff(small).isEmpty, but 3 of the 5 are rather pointless. No test string containing a character not found in the target string is worth the effort.
It'd be nice if the sliding window could &quot;jump&quot; over non-target characters. Doable, but not trivial.