In some languages, functions have their own type. This may or may not be a generic.
- How to define a function How to define a function. How to add functionality to a function. How does scoping the function work?
- How to use function parameters How to define function parameters and how to use them.
- How to return a value from a function How to return a value from a function. Does it require a specific keyword?
- How to call a function How to call a function and pass arguments to it.
This exercise deals with cooking a lasagna dish in the oven. The reference implementation (F#) teaches:
- How to define a function with one or two parameters.
- How to use parameters in a function.
- How to return a value from a function.
- How to call a function.
Track | Exercise | Changes |
---|---|---|
C# | lucians-luscious-lasagna | None |
F# | basics | None |
Julia | functions-introduction | None |
Ruby | basics | None |
Elixir | basics | None |
This exercise deals with creating set of functions which return functions that make use of closures.
- How to define anonymous (lambda) functions.
- How to return a function from a function.
- How to use a variable in a closure.
Track | Exercise | Changes |
---|---|---|
Elixir | basics | None |