Modules and functions
Modules group types and functions; functors parameterise modules.
What you will be able to do
- Define with module M = struct ... end.
- Use List.map and List.filter.
- Use dune for builds.
In plain English
Modules group types and functions; functors parameterise modules.
- Define with module M = struct ... end.
- Use List.map and List.filter.
- Use dune for builds.
module Lessons = struct
let long values = List.filter (fun n -> n >= 15) values
end
let () = List.iter (Printf.printf "%d ") (Lessons.long [12; 18])Your turn
EasyExplain it back
Answer from memory: Which keyword starts a module definition?
TEXT · starter
Your answer…Check your understanding before moving on.
Knowledge checkQuestion 1
Which keyword starts a module definition?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.