Why ~ can not broadcast?

why ~ can not broadcast?
a=randn(10)
b=a.>0
~.b is wrong
~b is wrong
map(~,b) is right.

It can broadcast. The syntax is just backwards for unitary operators.

julia> x = 0x1:0x5
0x01:0x05

julia> bitstring.(x)
5-element Vector{String}:
 "00000001"
 "00000010"
 "00000011"
 "00000100"
 "00000101"

julia> y = .~x
5-element Vector{UInt8}:
 0xfe
 0xfd
 0xfc
 0xfb
 0xfa

julia> bitstring.(y)
5-element Vector{String}:
 "11111110"
 "11111101"
 "11111100"
 "11111011"
 "11111010"
6 Likes

thanks