inspect(blahSomething) returns a string representation of whatever blahSomething is.
IO.inspect(blahSomething) prints the string representation of whatever blahSomething is to the standard output.
All of this is documented in the manual too.
Elixir’s structs are like structs in pascal or c yes, underneath they are just statically keyed maps, they are not packed in memory as in pascal or c though, especially since memory is not really a concept on the EVM, it manages it for you.
There is no static typing, however the dialyzer tool (also detailed in the manual) is an awesome tool that runs over your code and checks the success typing of your program, Dialyxer is a dead-simple Elixir interface for using it and I highly recommend it.
Prints information about the data type of any given term.
## Examples
iex> i(1..5)
Will print:
Term
1..5
Data type
Range
Description
This is a struct. Structs are maps with a __struct__ key.
Reference modules
Range, Map
Example:
iex(19)> i File.stat!("README.md")
Term
%File.Stat{access: :read_write, atime: {{2017, 3, 31}, {21, 24, 2}}, ctime: {{2017, 3, 31}, {18, 56, 52}}, gid: 20, inode: 10353339, links: 1, major_device: 16777220, minor_device: 0, mode: 33188, mtime: {{2017, 3, 31}, {18, 56, 52}}, size: 2879, type: :regular, uid: 501}
Data type
File.Stat
Description
This is a struct. Structs are maps with a __struct__ key.
Reference modules
File.Stat, Map
Implemented protocols
IEx.Info, Inspect