Devam Ediyor

Project for Lucas G.

Hi Lucas G., I see you are experienced with DrRacket/Scheme language. I have quite simple code from stackoverflow and I would like to better understand the code. I know almost zero knowledge of Lisp/Racket/Scheme but I need to pass one of my University exams :). I would like to better understand what each command does, how recursions in this code works etc. My idea is that I will send you the code and then we will have probably 1 hour call. We will go through code row by row. What do you think about it?

--------------------------------------------------------------------

code

--------------------------------------------------------------------

(define (n2t n)

(define 1to19 '(one two three four five six seven eight nine ten eleven twelve

thirteen fourteen fifteen sixteen seventeen eighteen nineteen))

(define multof10 '(twenty thirty forty fifty sixty seventy eighty ninety))

(define thousands '(thousand million billion trillion quadrillion quintillion sextillion septillion octillion nonillion decillion undecillion))

(cond

((= n 0) '(zero)) ; zero is a special case since from now on all 0 will be suppressed

((< n 0) (cons 'minus (n2t (- n))))

(else

(let loop ((n n) (units thousands) (res '()))

(cond

; --- below 1000

((= n 0) res)

((< 0 n 20) (cons (list-ref 1to19 (- n 1)) res))

((< n 100) (cons (list-ref multof10 (- (quotient n 10) 2))

(loop (remainder n 10) '() res)))

((< n 1000) (loop (quotient n 100)

'()

(cons 'hundred (loop (remainder n 100) '() res))))

(else

; --- 1000 and above

(let ((q (quotient n 1000))

(res (loop (remainder n 1000) thousands res)))

(if (zero? q)

res

(loop q (cdr units) (cons (car units) res))))))))))

-----------------------------------------------------------------

Best Regards,

Radim Bureš

Czech Republic

Beceriler: Haskell, Lisp, Python, Robotik, Scheme

Daha fazlasını gör: Hi beehive3d, I noticed your profile and would like to offer you my project. We can discuss any details over chat., Hi, I am Erp Project manager and C# .NET Framework Developer currently employed in one of the biggest software development comp, Hi! This project is a series of interviews. Each is an hour long (approx). I\ d like to get an accurate transcription of the int, Hi I am a fast and experience data entry operator and I’m very interested in your job post involving data scrapping. I have g, Write an iPhone application Hi,i have done unity3d project and i want to convert mac build in dmg build so if any one know how , technical writi g freelance project, n.g.o. website project in asp.net, freelance portfolio hi my name is project for after effects, hi! i bidded to your project but my offer wasnt exact if you already have a cloud based student attendance system already ill wr, hi webexpertssss i noticed your profile and would like to offer you my project i have few website correction and reset the pw fo, hi we have just looked through your requirements if you want to turn your ideas into a dynamic engaging web project send us a me, hi i need to configure freepbx and asterisk upon a project we have really quick and easy stuff thanks, hi i bidded to your project but my offer wasnt exact if you already have a cloud based student attendance system already ill wri, hi hegenabo i noticed your profile and would like to offer you my project we can discuss any details over chat it is editing sho, dharmendra g shah project manager hidden brains

İşveren Hakkında:
( 2 değerlendirme ) Prague, Czech Republic

Proje NO: #15770314

Bu iş için 1 freelancer ortalamada €15 teklif veriyor

Domus123

Hired by the Employer

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)
3.1