2019:notes_on_teaching_elixir
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
2019:notes_on_teaching_elixir [2019/04/29 14:06] – [Ordering for teaching functions] adolfont | 2019:notes_on_teaching_elixir [2020/11/19 11:42] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Ordering for teaching functions ===== | ===== Ordering for teaching functions ===== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <script async src=" | ||
+ | </ | ||
Line 15: | Line 20: | ||
[[https:// | [[https:// | ||
+ | |||
+ | |||
+ | ===== Method ===== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <script async src=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Calling functions ===== | ||
+ | |||
+ | Module, function and arguments. | ||
+ | |||
+ | ==== By arity ==== | ||
+ | |||
+ | === Zeroary functions === | ||
+ | |||
+ | < | ||
+ | Math.pi() | ||
+ | alias :math, as: Math | ||
+ | Math.pi() | ||
+ | </ | ||
+ | |||
+ | === Unary functions === | ||
+ | |||
+ | < | ||
+ | Kenel.abs(-34) | ||
+ | Kernel.abs (-34) | ||
+ | Kernel.absolute(-34) | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Kernel.abs(-34) | ||
+ | Kernel.abs -34 | ||
+ | Kernel.abs (-34) | ||
+ | |||
+ | Kernel.round(34.6) | ||
+ | Kernel.floor(34.6) | ||
+ | Kernel.ceil(34.9) | ||
+ | </ | ||
+ | |||
+ | === Binary functions === | ||
+ | |||
+ | < | ||
+ | Kernel.max(1, | ||
+ | Kernel.max(2, | ||
+ | Kernel.min(2, | ||
+ | Kernel.div(10, | ||
+ | Kernel.rem(10, | ||
+ | Kernel.div(10, | ||
+ | </ | ||
+ | |||
+ | |||
+ |
2019/notes_on_teaching_elixir.1556546770.txt.gz · Last modified: 2020/11/19 11:42 (external edit)