``` data class Book (val title: String, val types:...
# tornadofx
r
Copy code
data class Book (val title: String, val types: String)

val booklist = listOf(
    Book("1", "a b c"),
    Book("2", "b c d"),
    Book("3", "e f g"),
    Book("4", "a g h")
    )

val toinclude="a g".split(" ")
val toExclude ="f".split(" ")
    booklist.filter { book ->
        toinclude.filter { it in book.types }.isNotEmpty()

    }.filter { book->
        toExclude.filter{it !in book.types }.isNotEmpty()
    }.forEach { println(it) }