Find Jobs
Hire Freelancers

Mentor help

£18-36 GBP / hour

Closed
Posted about 6 years ago

£18-36 GBP / hour

Greetings, I have a course now in JS and functional programming and sometimes i need some help. I need a mentor that is willing to solve my questions and help me get through my problems. If you know how to write a functional and clean code please message me. Just a small test to see if you are capable to help me > We have a function cons : const cons = (x, y) => f => f(x, y); Cons store value to a variable pair : const pair = cons(5, 3); Create two functions car and cdr which each of them gonna return a argument of each. car(pair); // 5 cdr(pair); // 3 Each function should be written in one line.
Project ID: 16370987

About the project

8 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
8 freelancers are bidding on average £23 GBP/hour for this job
User Avatar
Have the answer.. Please inbox to get my answer..Hope its correct Thanks!
£27 GBP in 40 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Good afternoon, In response to your question, I'll give you your first lesson here. Your function calls at the end of your question are incorrect. Your initial function is a partial application: const cons = (x,y) => f => f(x,y) This means you need to first pass some x and y value to cons and then pass a function to that. You have it backwards in the code you posted. It would go like this: const cons = (x,y) => f => f(x,y) const pair = cons(5,3) const car = (x,y) => x const cdr = (x,y) => y pair(car) // returns 5 pair(cdr // returns 3 As you'll notice, you have to pass functions to pair in order to complete the partial application. I can give you more well explained lessons like this through whatever your preferred platform is. I'm located in New York, currently. But I can be flexible with my availability. So whatever time works best for you can work for me as well. I look forward to hearing more from you soon. Best regards, Naythan
£22 GBP in 40 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Functional JS Expert here speaking excellent English and based in Poland. Please check my github for funcional JS examples.
£30 GBP in 40 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of NORWAY
Stavanger, Norway
5.0
1
Payment method verified
Member since Oct 9, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.