This Slack discussion by , Oliver N and Arvin Kushwaha occurred in slogging's official #programming-challenges channel, and has been edited for readability. In the least amount of lines in your preferred language, build a recursive function that calculates the prime numbers. Bonus points mostly to number lines and also to a system where recursion doesn't fault. Jan 27, 2021, 1:42 AM Dane Lyons Jan 27, 2021, 1:44 AM my one line js 😄 const f = (n, x) => x === undefined ? f(n, n - 1) : x > 1 ? n % x !== 0 && f(n, x - 1) : true; Oliver N Jan 27, 2021, 1:52 AM console.log(f(2)) console.log(f(3)) console.log(f(4)) console.log(f(5)) console.log(f(6)) console.log(f(10)) console.log(f(13)) Oliver N Jan 27, 2021, 1:53 AM Hilariously man I was gonna say no js trickery Jan 27, 2021, 1:54 AM Thot that was anti my ethos hah Jan 27, 2021, 1:54 AM haha, why 😄 Oliver N Jan 27, 2021, 1:54 AM That was quick! Are you looking for work and what other languages you work in Jan 27, 2021, 1:54 AM I'm working mostly in Go and JS Oliver N Jan 27, 2021, 1:55 AM I love node. Never figured out go. Jan 27, 2021, 1:55 AM Go is compiled tho ya? Fast? Jan 27, 2021, 1:55 AM yes, compiled, and fast Oliver N Jan 27, 2021, 1:56 AM Yeah we looked at that or rust to get our cycles down. Both confuse me Jan 27, 2021, 1:56 AM ppl even use Go to compile JS to make it fast Oliver N Jan 27, 2021, 1:56 AM https://github.com/evanw/esbuild Didn't answer q tho do you have much free time? My company is ostensibly giving me my offer in the next 1-2 weeks after we finalize the fund in caymans. I offered to cut my salary if we could give it to what we've been affectionately calling a 'real dev'. I'm great at POC and shipping but am entirely self taught, untested, procedural and.. well. Jan 27, 2021, 1:59 AM Jan 27, 2021, 2:00 AM Https://coindexlabs.com Yes, we know the color scheme sucks Jan 27, 2021, 2:00 AM I mixed up ostensibly and allegedly. Ha! Jan 27, 2021, 2:01 AM how about part-time? Oliver N Jan 27, 2021, 2:01 AM Would probably do the trick yeah. You just did in a few minutes what would have taken me hours. Does that one liner fault ever? Jan 27, 2021, 2:02 AM And do you have much experience with trading systems? Crypto exchange apis? Jan 27, 2021, 2:02 AM yeah, maybe, I haven't test it with any input other than number, also maybe it will fault with JS infinity Oliver N Jan 27, 2021, 2:03 AM We have some other candidates but yeah do send your resume maybe or linkedin here or pm? Forward to ceo Jan 27, 2021, 2:03 AM Oh yeah no no worries on bad input, I meant as increasing Jan 27, 2021, 2:03 AM Utsav Jaiswal David Smooke looks like your new product may have done what months of searching including your new partners on jobs.hackernoon didn't ;) Jan 27, 2021, 2:11 AM When you say recursive function that calculates the prime numbers, do you mean returns a sequence of prime numbers or checks if the number is prime? Arvin Kushwaha Jan 27, 2021, 2:35 AM Very good point, my original idea was indeed to return the sequence of primes. When the original answer was posted I chaulked up the disconnect to miscommunication and a failure in directions :) Jan 27, 2021, 2:29 PM Well, in that case, here's my answer in Python g = lambda x: (print(x) if not any([x%i == 0 for i in (range(2, x) if x < 10 else range(2, int(x**0.5)))]) and x >= 2 else False) or g(x+1) g(0) # Or any number you wish to start fromOf course, it does have the limitation of recursive depth... Arvin Kushwaha Jan 27, 2021, 3:41 PM Is also the reason I made a bonus point about faulting. Any idea when the recursive depth would fail? Does it vary? Jan 27, 2021, 4:04 PM Arvin if you don't mind and you'd wanted to be considered can you send linkedin github or whatever via pm? Jan 27, 2021, 7:31 PM