# Assigning a function to unicode symbols

**URL:** <https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909>\
**Category:** General Usage\
**Created:** [March 13, 2020, 1:24am UTC](https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909 "2020-03-13T01:24:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hros](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hros](https://discourse.julialang.org/u/hros)\
**Post date:** [March 13, 2020, 1:24am UTC](https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909/1 "2020-03-13T01:24:49Z")

</div>

I tried to assign a function to a unicode symbol and found out that while this works for most supported unicode symbols it fails for some.  
specifically, you can see that Julia seems to be picky regarding assignment of \triangleleft :

```julia
julia> ⊲ = sin # \vartriangleleft
sin (generic function with 12 methods)

julia> ⊳ = sin # \vartriangleright
sin (generic function with 12 methods)

julia> ▷ = sin # \triangleright
sin (generic function with 12 methods)

julia> ◁ = sin # \triangleleft
ERROR: syntax: invalid character "◁" near column 2
Stacktrace:
 [1] top-level scope at REPL[7]:0

```

Is there some logic behind this? and if so, is there a list of symbols which can be used?

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [March 13, 2020, 2:00am UTC](https://discourse.julialang.org/t/assigning-a-function-to-unicode-symbols/35909/2 "2020-03-13T02:00:21Z")

</div>

The list (in source code) is [here](https://github.com/JuliaLang/julia/blob/master/src/julia-parser.scm). ‘◁’ (\triangleleft) is omitted. As ‘▷’ (\triangleright) is included, I expect this was originally an oversight. However see [#30658](https://github.com/JuliaLang/julia/issues/30658) where it is suggested that this character be used as single character `pipe` operator.

I concur that having both of a operator/relation glyph pair is better than having only one of them.
