How to change => to another symbol?

Is any way to change => as in Dict(“A”=>1, “B”=>2) to a single symbol in Julia?
For example, to :, →, or |.

1 Like
julia> const → = =>

julia> Dict( :a → 1 )
Dict{Symbol,Int64} with 1 entry:
  :a => 1

Note that → is the only one of your suggestions that isn’t already bound and that typing it is not shorter than =>.


Thank you for replying so quickly. And, yes, you have understood my intension correctly: it should be a nice sutable symbol that can be typed in one stroke. Colon is used for such case in Python. So, for me, it would be preferable. But, at least, right arrow does not look so ugly. :slight_smile: Moreover, I can set it to somewhere on the third level of my keyboard layout.