-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
answer #30
base: master
Are you sure you want to change the base?
answer #30
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.