With respect to your end goal ...
If you're looking to do a map over numbers only, why don't you use ... ?
(with (neg) OF () as an example mapping operation).
Or if you are looking to filter numbers only, you could use something like:
(with () < (0) as an example filter operation).
If however you really really want to create a list with two sublists without having to do the selection operation twice you could also use MAP to produce a list of TRUE and FALSE, and then two filters. This is nonsense in the case of IS () A (number) of course, but may be useful if your selection operation is e.g. very time-consuming:
Yet another approach, using FOR EACH:
Which approach you choose (including your own #3) is up to you. Yours is very compact, yet less readable than my suggestions, IMO. And perhaps one of the approaches yields faster execution, that's something you would have to try and measure if it matters to you.
I find it interesting how much forum people have started using metaprogramming features to solve problems that shouldn't really require them. This is not a criticism of forum people; it reflects the fact that the ordinary-programming ways to do things are syntactically more complicated.
(An interesting deep question I'm too tired to think about right now is whether this reflects some inherent weakness in block language syntax. I'll think about that tomorrow.)
So, here's the official non-meta way to do what you're doing with that JOIN block:
The reason you had trouble finding this solution is that you got confused about whether input #1 is a predicate or a Boolean. That's why I gave the inputs meaningful names in my version. The input to NOT must be a Boolean, so it's a domain error to say . You are trying to work in the algebra of functions. So another way to accomplish this task would be
Just to make the crucial part bigger so you can see it:
The inputs to COMPOSE are functions, and it reports a function, which is what KEEP expects as input. So it's important to unringify that COMPOSE expression, so that the input to KEEP is a function of Booleans, rather than a function of predicates.
But the real problem in this exercise isn't just that you had to put the function in the program twice (a problem that procedure inputs solve nicely), but also that the computer has to test the function twice for each item of the list. Really you should invent a new SPLIT higher order function for this situation:
The "is an number" and the data set were just a simple example
I'm actually trying to find duplicates of certain types of blocks in a script
So 1st operation is to split my master list into possible candidates and then I'm going thru the 1st list and removing duplicates and then re-assembling the list again