c++ version of J's a ?@$ b