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 → = =>
Pair
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 =>
.
3 Likes
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. Moreover, I can set it to somewhere on the third level of my keyboard layout.