- How to show data inside the console:
Js.log()
- Create let binding with simple value like string/int DOC
- Basic type - try to type let binding from the previous step DOC
- Create a record with several different type string/int/float/bool and try to log into the console DOC
- Create an array with string/int elements DOC
- Create a tuple and try to destruct it. Show destructed date inside a console DOC
- Create a list with some strings, e.g. names or something else DOC
- Create basic functions that will do multiplication and sum function DOC
- Refactor the previous function and use labeled arguments DOC
- Use currying of the prior step DOC
- Create a variant that will contain Yes/No answer type. Try to assign it to the let binding DOC
- Create a constructor variant. Type should hold a few information about a conference like Name, Duration, and City. Each variant should contain type constructor e.g. the name should hold a string DOC
- Create a parameterized type. e.g.
zone
(x,y, radius) that can hold three values, two of them are of the same type, and the last one are different. Result type should be like:list(int, int, string)
orlist(float, float, bool)
- Create the optional type with
option
and assign to let binding. UseSome
andNone
DOC - Pattern Matching! DOC
- Create a variant of knowledge level e.g.
Low
,Medium
andHigh
- Create a variant of three programming languages that you like
- Create a function which accepts 2 arguments (knowledge and language) and try to match all cases - if it possible ;)
- Create a variant of knowledge level e.g.
- Create a separate module called
Utils
for thesum
function, try different approaches DOC - Get list/array and try to display each element in the console API
- Refactor previous map/iter and use
pipe
operator and show output in the console API - Try to write functions that solve the factorial algorithm (5! = 5*4*3*2*1 = 120), using recursive and Pattern Matching.
npm run ex1
npm run ex2
npm run build
npm run start