Conversation
|
@ludwig-vaan This is great, thanks! It might be nicer to have all the answers in the master branch itself. Let me think about it and merge it in a few days. |
| let greatest = ref(min_int); | ||
| let smallest = ref(max_int); | ||
| lst | ||
| |> List.iter(value => { |
There was a problem hiding this comment.
In my very personal opinion, an example answer probably shouldn't use |> given this syntax was not introduced in this tutorial.
There was a problem hiding this comment.
I second that... Pipes are missing as a topic in this exercise. Plus its a very important concept.
There was a problem hiding this comment.
@adilmas13 @PraveenInvideo Thanks, that makes sense. We're working on a major improvement to the content and will definitely fix this issue in that.
| /* Write functions to extract the first and second elements from a pair. */ | ||
| /* let first: pair('a) => 'a */ | ||
| /* TODO try with fst */ | ||
| let first = pair => fst(pair); |
There was a problem hiding this comment.
Where did fst and snd come from? Was the discovery of these functions the purpose of this exercise?
|
We're leaving this PR open for folks who want to see the answers. Many thanks to @ludwig-vaan. We're working on a new iteration of the course. It'll have online interactive exercises with tests, more focus on types and not just FP/recursion, plus topics on real-world development with modules and interfaces. We'll include the answers as hints/solutions in that version. |
Hi,
If you want, you can create a new branch call answer, and use my commit for it.
btw, thanks for your work, it's appreciable to learn ReasonML.