How do you check for the type of variable in Elixir

前端 未结 8 1289
走了就别回头了
走了就别回头了 2021-01-30 15:25

In Elixir how do you check for type such as in Python:

>>> a = \"test\"
>>> type(a)

>>> b =10
>>> type(b         


        
8条回答
  •  难免孤独
    2021-01-30 15:54

    Also for debugging purposes, if you're not in iex, you can call it directly:

    IEx.Info.info(5)
    => ["Data type": "Integer", "Reference modules": "Integer"]
    

提交回复
热议问题