• I love ramda and would be super happy if there are more challenges for it. For sure you never have to use ramda compared to pure js to solve those problems, but for function composition and training your FP skills it would be nice.

  • The merge function has been deprecated. You should consider updating to mergeLeft (it will make the placeholder redundant).

  • You wanna make world better place ? Tell me which one's better ? easy,non-progressive,vulnerable OR challenging,progressing,safer ? I wouldn't want kids in my world to grow up dumb and be prey! You wanna make it better? teach than defer!

  • Wow, that conversation is still going on. Ok, let me chip in.

    I still think it's a shitty solution. But hey, since it's not a real-world problem - why bother? You can do whatever you want :)

    It looks like someone does not understand the definition of a comment / opinion - "you've picked a fight". WTF man? I just left a comment. My opinion. You don't like it? I couldn't care less.

    "That's not going to happen, mate." - holy crap, these are some strong words. What are going to do? Convince me that this code is obvious for professional, experienced programmers like yourself and noobs like me should just shut up and learn? Please.

    I wanted to be nice and bury the hatchet since I wasn't going to war or anything. But it seems that I triggered some people ("hurr durr noob!"). You want to go on with your crusade - be my guest. It's you who's ranting, not me.

    Have fun, I'm going back to my "hello world" example in JS, maybe I'll finally get it right!

  • Giving my 2 cents here.

    Keep in mind what i'm writing here for the rest of my comment : I do realise the solution is elegant, and is appropriate in the scope of codewards, aka in the case you're doing it to learn of more efficient ways to code for high performance / critical areas, or as a sandbox playground.

    But fojuth has a point, and a good one. In real world problems, where your code gets handed over to other people that will maintain it, modify it, add to it etc.. and most importantly, that you don't screen, choose or recruit to do your job after you move on, putting code like this in production is a serious case of tempting the devil and opening the gates to potential pitfalls down the line.

    A developer's job is building software, often in a team. It's not about code performance until it's specifically needed, it's more about team productivity, high velocity in task completion and a development cycle as smooth as possible.

    I feel the need to address your point about what comments should be used for. I saw this a lot with peers in university, but I digress. Comments shouldn't explain the what or the how of a certain piece of code (basically what intent + explanation means), they should explain the why, that's what truly adds value to readability without clogging your mind with unnecessary low level details, and makes code pieces literally essays.

    CS is, as its name suggests, a science. Programming on the other hand is a craft that uses CS to achieve what it wants. Please make this distinction in context while reading other comments.

    Also.. As a side but important note, do leave reddit-like comments far from dev communities. Our field is harsh enough as it is dealing with other stuff, and most of us like to help and be respectful to each other. Have some pride in what you do and leave bashing and shittalking to people with time to burn and nothing else to do.

  • Well, that's what I've been saying above: the code itself should be as concise and elegant as possible, while the intent or explanation of the code should go in the comments. Dumbifying the content of the code itself just to make less competent people able to follow, at the expense of clean and concise code, is the real wtf and unacceptable thing.

    (By the way, the explanations have been provided down the comments below.)

    But then, I'm not surprised that lots of newbies went down the path of "why you no spoonfeed me noob code". The fact that OP get something like 31 score is mind-boggling yet anticipated. It's really something that's even more basic and fundamental than "coding fundamentals"...

    p.s If anything I want to bash this OP more for his blatant and shameless "pick-a-fight-and-run" tactic. After all, you've picked a fight yourself, and then you're just going all "you misunderstood me, I do not wish to discuss any further" and try to get away with it like nothing happened? That's not going to happen, mate. There are consequences of picking up a wrong fight, and you need to face it.

  • Good point.But you post at the wrong place.

    This code is simple and just doing one thing.It's not unreadable.

    If you don't know what the code is doing.You should learn.

    It's faster than the normal code.If you have an cost-efficient issue,it will help you.

    For honestly,you should have learned if you are studying Computer Science(At least in our country).But we just don't know where to use it.

  • Uhm, git gud then?

  • Voile
    "you're accusing the wrong one-liner here. This one-liner is so simple what it does is obvious from first sight"

    No it is not simple and no it is not obvious what it does at the first sight PERIOD

  • Thanks, will do all of it.

  • I'll think about that, thanks!

  • Thanks for the feedback. I will test Ramda method usage.

    Ramda is not a framework. It's a library, a collection of FP-like functions, to help you implement FP in you JS code. It's not a new invention. Ramda comes from Haskell, which is a pretty damn good FP language :)

  • No, it does not add any value. This series of kata is for people who want to get familiar with Ramda. We want to cover all Ramda methods, so you'll eventually have to read about every one and use them.

    I have some ideas how to enforce usage of the required methods :) I will test them soon.

  • Thanks, will do so.

  • Loading more items...