Skip to content
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

Lesson 5 Step 4 #140

Open
bit4bit opened this issue Jan 15, 2014 · 4 comments
Open

Lesson 5 Step 4 #140

bit4bit opened this issue Jan 15, 2014 · 4 comments

Comments

@bit4bit
Copy link

bit4bit commented Jan 15, 2014

hi i newbie with ocaml..

I do this solutions.. but nothing say me that is it the answer:

let up = let up = Char.uppercase in
let big_xy = List.map up xy in
let big_ab = List.map up ab in
big_ab @ big_xy

val up : char list = ['A'; 'B'; 'X'; 'Y']

or

let up = 
let big_xy = List.map Char.uppercase xy in
let big_ab = List.map Char.uppercase ab in
big_ab @ big_xy

val up : char list = ['A'; 'B'; 'X'; 'Y']

or

let up =
List.map Char.uppercase ab @ List.map Char.uppercase xy

val up : char list = ['A'; 'B'; 'X'; 'Y']

thanks..
for any answer.

@cagdasbozman
Copy link
Contributor

All your answer is correct and equivalent. There is no better answer in your case.
If I had to choose, I'll take the second one, then the third one and finally the first answer.

@bit4bit
Copy link
Author

bit4bit commented Jan 15, 2014

thanks..
but the lesson not complete..

@guido4000
Copy link

I would assume the simple solution to be the following:

let up = Char.uppercase in
  let big_xy = List.map up xy in
  let big_ab = List.map up ab in
  big_ab @ big_xy

@cdaringe
Copy link

Lesson 5 Step 4 introduces concepts not covered before the step.

  1. syntax w.r.t. multiple let expressions in a function are not covered (where do ins go? ;s?)
  2. @ symbol/operator? (still doing these exercises) is not covered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants