How do you access the documentation for any function?
Answer
With the h function. For example, typing h trunc/1 is going to print the documentation for the trunc/1 function.
Tags
#elixir
Question
How do you access the documentation for any function?
Answer
?
Tags
#elixir
Question
How do you access the documentation for any function?
Answer
With the h function. For example, typing h trunc/1 is going to print the documentation for the trunc/1 function.
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it The Elixir shell defines the h function, which you can use to access documentation for any function. For example, typing h trunc/1 is going to print the documentation for the trunc/1 function: iex > h trunc / 1 def trunc () Returns the integer part of number .
Original toplevel document
Basic types - The Elixir programming language s named trunc and takes 1 argument, whereas trunc/2 identifies a different (nonexistent) function with the same name but with an arity of 2. We can also use this syntax to access documentation. <span>The Elixir shell defines the h function, which you can use to access documentation for any function. For example, typing h trunc/1 is going to print the documentation for the trunc/1 function: iex> h trunc/1 def trunc() Returns the integer part of number. h trunc/1 works because it is defined in the Kernel module. All functions in the Kernel module are automatically imported into our namespace. Most often you will also include the module
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.