5 kyu

Calculating with Functions

35,088 of 86,289BattleRattle
Description
Loading description...
Functional Programming
  • Please sign in or sign up to leave a comment.
  • Nikita0x Avatar

    I really really liked this mind-bending kata... I read other comments - and to me the description of what to do was very clear.

    I am still very much struggling with closures, Higher Order Functions - but I was able to solve this kata (which is of 5 kyu lvl) way quicker than this 6 kyu kata... https://www.codewars.com/kata/5b0a80ce84a30f4762000069

  • p199y991 Avatar

    This comment has been hidden.

  • Geranad Avatar

    I really enjoyed this kata, it's been a fun exercise in functional programming for me. Thanks a lot!

  • esgard Avatar

    What should I do in this kata? I made a universal function that decomposes a string into expressions and calculates a formula. But what should I do in this damn kata?

  • Sayed Naveed Avatar

    This comment has been hidden.

  • agatohn Avatar

    It has wrong tests on attemp!

    Wrong result for one(dividedBy(three)): expected 0.3333333333333333 to equal +0

    "three" - passed like variable!

  • muhammadfathurraiyan Avatar

    fun kata, javascriptable kata

  • NewComer00 Avatar

    This comment has been hidden.

  • ExistedGit Avatar

    A creative lesson about FP

  • danibrb Avatar

    Mindblowing exercise!! I must learn lambda function

  • BlueDragonFire Avatar

    This comment has been hidden.

  • o2001 Avatar
  • trashy_incel Avatar

    OCaml translation (author gone)

  • Grecks Avatar

    C++ translation wanted.

  • Grecks Avatar

    I really, really enjoyed this kata, it's been a fun exercise in functional programming for me. Thanks a lot!

  • ayoni02 Avatar

    Ever since I got to solving 5kyu, I feel like I don't know s*** in Python

  • TimoNotThy Avatar
  • Abolfazl20203 Avatar

    i have a serious issue, the tests do pass in vscode for javaScript language but here they don't. is there something i am missing?

  • ZevsCrut Avatar

    in standart tests is ok, but in random it gives me an error "AttributeError: ", but in Pycharm everything is OK for example three(minus(two())) in console gives "1" and in tests Unexpected exception raised

  • good_enough Avatar

    This comment has been hidden.

  • omarAlomar01 Avatar

    this kata very good it help my to understand how function work and i enjoy very much solving it.

  • gigawa77 Avatar

    I have absolutely no idea what I'm being asked to do

  • iNikAnn Avatar

    That was... fun? 🥲

  • ivanTheTerribleSQL Avatar

    This comment has been hidden.

  • HighQ Avatar

    Chai..

  • jinumi Avatar

    This comment has been hidden.

  • AlexUA Avatar

    Looks like tests are broken here

    Wrong result for eight(minus(eight)): expected 8 to equal +0

    multiply Wrong result for four(times(zero)): expected 4 to equal +0

  • Daedalos Avatar

    This comment has been hidden.

  • jkimbell Avatar

    This one is great, but I wonder if you should ban eval. A while ago I solved it with eval and got none of the fun until solving it again the "real" way with functions.

  • Sebastian_123 Avatar

    Do you have problems with testing this kata? My code is ok in basic tests, but it is incorect in random tests. I don't understand what's happening. I think my solution is ok. Can anybody help me?

  • mlionhart Avatar

    I have no idea what the author is asking me to do. Very unclear, vague instructions. Whenever I write instructions for students, I'm careful to word things so there's no ambiguity.

  • nikanikanika Avatar

    This comment has been hidden.

  • Alef-0 Avatar

    This comment has been hidden.

  • Polymorbism Avatar

    Tedious, but fun!

  • sergiodev19 Avatar

    This comment has been hidden.

  • mugen34 Avatar

    This comment has been hidden.

  • jinks908 Avatar

    I can't get around the need for arguments. In order to pass in the operation functions into the first number, we need to require an argument. But since the second number doesn't take an argument, we can't require one.... So do we have to write two functions for each number?

  • technoeed Avatar

    Who can give the solution of this error: TypeError: times() takes 0 positional arguments but 1 was given. Is it kata error or I'm doing something wrong?

  • Walkingsue Avatar

    i dont think i understand this kata, like im sure that im suppose to use callback, and from what i understand my code should return the same result that example given but i keep getting error

  • yichenchong Avatar

    This comment has been hidden.

  • t-macp Avatar

    first of all. I have learned so much by atempting this kata! Very challenging in a fun way.

    this may be a stupid question but are we allowed to create more functions than the ones given?

  • AlexanderDarwin Avatar

    Error during random calculations

    Wrong result for seven(dividedBy(six)): expected 1.1666666666666667 to equal 1

    six passed as variable, not as function six()

    if i call in console seven(dividedBy(six())) all is ok

  • ElliotME Avatar

    Not to sure what I did wrong but when I clicked attempt it says

    SyntaxError: Unexpected token '*' at four (test.js:8:47) at Context. (test.js:26:24) at process.processImmediate (node:internal/timers:471:21)

    I have * in my code for times. JS Also not sure if im ment to mark this as a issues or question?

  • Forbz Avatar

    Why are there so few languages in which you can write this kata?

  • R.Daneel.Olivaw Avatar

    Amazing Kata!!!, this first time my code was shit but i figured out, :)

  • fartrainbows Avatar

    i'm confused. why would i want to do this when i could just write a function that takes two numbers and multiplies two numbers eg?

  • DavidKonzen Avatar

    I'd love to come back to this one. I am not understanding the directions. It sounds like we should be producing 40 total functions, but the code window only has 14. If you do each of the 4 mathematical operations on each of the 10 digits, that would be 40 functions. What am I not understanding?

  • Mahmoud-00 Avatar

    cool kata!

  • VladZaMir Avatar

    Great kata, allowed me to finally understand how the returning functions from functions works. Thanks!

  • PythonUser2233 Avatar

    My code requires function call as a string but the input is a direct function call. Can someone help me convert the input function call as a string?

  • Beefy1 Avatar

    Very nice kata. Beginners will learn new concepts from this.

  • Narmoo Avatar

    This comment has been hidden.

  • azikgal Avatar

    This comment has been hidden.

  • ProffesorEyebeam Avatar

    This comment has been hidden.

  • Diableros Avatar

    Why is the innermost function without brackets in a random test? Because of this, the test does not pass normally.

  • sanba-anass Avatar

    i did solve the problem but i didn't learn anything new from my solution xD

  • AndrewBaisho Avatar

    My solution passed all the tests but upon seeing the official solutions I have doubts that it should count as understanding the spirit of the problem. Any tips on where to study the material involved here?

  • Polar Bear Bad Avatar

    This comment has been hidden.

  • Max-M-Feige Avatar

    Saw the prompt absolutely broke my mind. Then the aha moment clicks and its really fun

  • ReelCoolGuy Avatar

    Had me for a bit; first time I've encountered called functions within called functions and I wasn't really sure how to approach it. Seems there's many ways to handle this one, not totally satisfied with how I did it, but it seems it's not the worst way either.

  • CLQUDLESS Avatar

    This comment has been hidden.

  • SarsSappy Avatar

    Great kata! I enjoyed solving it, it was the first time I ever tried a functional programming related problem and, honestly speaking, I had no idea where to even begin with.

    Though, I would like to make a request for an improvement. It would be good if it took divisiblity by 0 into account. It returns Infinity, at least, in JS

  • RushabhTekwani Avatar

    This comment has been hidden.

  • IoghiStudio Avatar

    Took me one hour , but the time is worth ! Is a tricky one!

  • dongh6179 Avatar

    Extremely interesting problem. I def need to go back through everyone's solution to understand how to become more efficient in coding.

  • MDuude Avatar

    This comment has been hidden.

  • rockduskunu Avatar

    Really need help about solution can anyone give me tips o_o

  • noweare Avatar

    Now i see the value of lambda functions. I kept getting errors because the functions were not expecting arguments so I had to use self Spent some time learning lambda functions. In C they are just function pointers in python they are function objects.

  • alexsmik Avatar

    This comment has been hidden.

  • mathung Avatar

    My solution was super ugly but it worked. I'm going to have to come back to this later to look through the other solutions and learn how to do this properly

  • kbç4 Avatar

    I'm trying this in Python 3.6, if anyone can point sources helpful to acccomplish this task, I'd greatly appreciate.

  • eddok Avatar

    Was fun is there a #2?

  • zougari47 Avatar

    This comment has been hidden.

  • henry lam Avatar

    This comment has been hidden.

  • csonc Avatar

    Just want to say thanks to all the other people who are mentioning the mind-bending nature of this problem: these comments make me feel comforted and I appreciate you all. This is one of those problems where we can doubt our capacities BUT WE MUST TAKE HEART!

    The fact it is so challenging means that we are in the perfect place for growth. We must keep bashing into this problem and analyze the solutions and I swear the investment in doing so will pay off far more than other less challenging problems. Deep work is happening here.

    As programmers/coders we must learn to love these situations for this is exactly what we are getting into as programmers/coders. We must learn how to become excited and curious, we must learn how to say "How fascinating!" in the face of all the other voices which may speak self-defeating phrases.

    Lastly, this is the perfect type of problem to spend like 30-45 mins on analyzing and trying to comprehend, then taking a walk or some other activity (or even a nap) where we are not actively thinking about the problem. Our brain will be working on it in the background, oftentimes despite ourselves. Then when we come back to it we will be shocked that our comprehension has increased. Experiencing this is so crucial because it will teach us to trust in the process, which will allow us to embrace these situations all the more.

    Blessings to all you!

  • botarmy Avatar

    This comment has been hidden.

  • MatLewis001 Avatar

    I tried to do this for a long time, I achieved that in another editor (PyCharm) the tests pass correctly in debug mode, but not during normal launch. What should I do?

  • GoryIceCream320 Avatar

    This comment has been hidden.

  • Kacarott Avatar

    Factor translation

    Note: the kata is slightly different in factor, and so should be reviewed carefully.

  • JohanWiltink Avatar

    This comment has been hidden.

  • timmcwilliams Avatar

    I can't even get function seven(times(five())) in the editor without an error. Guess this one will take some time

  • TheBestNightSky Avatar

    Both the idea of actually doing this as well as my solution make me want to vomit... I regret nothing.

  • canx Avatar

    Hey there, Can you add this case to test cases as well?

    print(two(times(times(six()))))

    Thanks in advance.

  • S-Sereda-dunice Avatar

    This comment has been hidden.

  • a.bouillon21 Avatar

    This comment has been hidden.

  • spark131008 Avatar

    This comment has been hidden.

  • Thir_ Avatar

    This comment has been hidden.

  • ubant Avatar

    This comment has been hidden.

  • Midnitte Avatar

    This comment has been hidden.

  • Rseanio Avatar

    This comment has been hidden.

  • Development-Person Avatar

    This comment has been hidden.

  • AAF-6064 Avatar

    This comment has been hidden.

  • RossKostenko Avatar

    This comment has been hidden.

  • Keperoze Avatar

    This comment has been hidden.

  • thalysluis Avatar

    This comment has been hidden.

  • -freedom- Avatar

    This comment has been hidden.

  • victorlev01 Avatar

    Great kata!, helps to understand language better and use more features

  • valoruz Avatar

    This comment has been hidden.

  • Gunter135 Avatar

    This comment has been hidden.

  • Lencof Avatar

    hmmmmm!

  • VilaVanilla Avatar

    This comment has been hidden.

  • sexpixels Avatar

    This comment has been hidden.

  • RNOH Avatar

    This comment has been hidden.

  • ArpadGBondor Avatar

    This comment has been hidden.

  • cesarbhering Avatar

    Spent a few hours on this, amazing kata!

  • kb1907 Avatar

    Thanks for the kata. I had to look over all the materials which I thought I knew very well. It was a good refresher and a nice challenge.

  • helloImSf Avatar

    This comment has been hidden.

  • tumbler_switch Avatar

    This comment has been hidden.

  • DragonLightning78 Avatar

    This kata is really difficult. I have no ideas about it. I could barely print the first function

  • cschipg Avatar

    This comment has been hidden.

  • Renaud808 Avatar

    This comment has been hidden.

  • dcorlin18 Avatar

    Don't create a function called eval() (at least for JS). You will see some weird errors.

  • Alex-vadim Avatar

    Thanks a lot for Kata's creators. I spent a night for solving. Kata description gave an idea - studying of HIGHER-ORDER FUNCTIONS.

  • SolitudeRain Avatar

    This comment has been hidden.

  • Cowave li Avatar

    Kata I love him very much

  • KatyaBarta Avatar

    This is the most useful challenge I've ever done!! At first it was turning my brain into a pretzel, and then the pretzel gradually clarified into something that made sense, and I feel like I learned a ton. Thanks for this kata!

  • macihtwawinCW Avatar

    This comment has been hidden.

  • Sjourd Avatar

    This comment has been hidden.

  • pedi_ch Avatar

    This comment has been hidden.

  • Roman_Roman Avatar

    God it finally works, though not all tests are passed yet. My advice to those struggling is to knuckle down, since it's really rewarding in terms of acquired knowledge. Good luck!

  • ivanmclennon Avatar

    This comment has been hidden.

  • lavreshka Avatar

    Have no polite words to describe my misery!!! In tests there is a case 'Test.assert_equals(basefa, a+b)' There weren't any words about bases And no words about letters Please do something

  • ase444ka Avatar

    This comment has been hidden.

  • Davisino Avatar

    This comment has been hidden.

  • sflow Avatar

    This comment has been hidden.

  • peer99 Avatar

    This comment has been hidden.

  • lonkaan Avatar

    Just looking at the solutions of this kata is beautiful.

  • Arne Sch. Avatar

    This comment has been hidden.

  • roberthparker86 Avatar

    I'm super stuck here. Read an article about function composition that someone here suggested, but that didn't help. I'm confused as to how the outermost function is supposed to generate a value and then pass it to a function that is it's argument. The function composition article didn't state that at all from what I read. FYI, I'm trying to solve in Python.

  • Nurlan Nurmash Avatar

    Can someone give me an idea what I must to learn to solve this kata? I'm stacked, I have no idea now how to solve it.

  • Tony308 Avatar

    This comment has been hidden.

  • anirudh1666 Avatar

    This comment has been hidden.

  • animosi Avatar

    This comment has been hidden.

  • krischinx Avatar

    This comment has been hidden.

  • Chrono79 Avatar

    This comment has been hidden.

  • divy9t Avatar

    This comment has been hidden.

  • cOdOrHoDoR Avatar

    Very interesting and challenging Kata, learned a lot of new things, Thanks for making this!!

  • Clonewarrior Avatar

    Nice! Learned something new today!

  • Carlins Avatar

    Doing it, very fun kata. I am coming to realise that a Test Driven Development approach to this one really helps, and I find it funny because I did not get what made TDD so useful until now!

  • Erynvorn Avatar

    Very hard kata.

  • iapaolaza011 Avatar

    This comment has been hidden.

  • MrAnders Avatar

    For me (as a relative novice), this problem seemed really difficult/strange to begin with. However, after understanding it better after som googling, I now think it's an extremely useful kata, and I would recommend everyone being stuck here to hang in there and try a little harder. GL :)

  • naushil Avatar

    This comment has been hidden.

  • djordjes Avatar

    In the description it says : "Divison should be integer division" but there are no test for that case.

  • ZerefDragneel Avatar

    I completed this kata but my code and the solutions by others that I've tested(about 4 or 5) on python 3.8 don't work despite working on this site. Also, can someone send me a code which still works on python 3.8 (I'm guessiong it doesn't work because of an update)

  • NaikoN Avatar

    This comment has been hidden.

  • AyaSt Avatar

    Definitely the kind of Kata that forces you to look at the functions in a new way. Gave me a breakthrough moment that was much needed!

  • Rodjer.m Avatar

    Golang translation provided

  • zrhr Avatar

    This comment has been hidden.

  • nschaefe Avatar

    This comment has been hidden.

  • gibstock Avatar

    This comment has been hidden.

  • Sergio2R Avatar

    This Kata was extremelly hard for me, nearly impossible. I have learned something new

  • FArekkusu Avatar

    Language-specific code blocks should not be separated. Also, there's no example for Python (kind of).

  • gxcad Avatar

    This comment has been hidden.

  • Dranzeleaf Avatar

    This comment has been hidden.

  • krishp Avatar

    This was definitely a weird kata for me but it was a nice learning experience! Thanks for creating this.

  • epsonlee Avatar

    This comment has been hidden.

  • MP7373 Avatar

    This was a really fun kata, lots of ways to solve which leads to a lot of fun reading other peoples solutions.

  • Rideveloper Avatar

    Thanks for this kata, opened my eyes to a whole new world of coding

  • sjlutterbie Avatar

    This comment has been hidden.

  • ColorfulCodes Avatar

    Very interesting question. I'll have to come back to this.

  • madars Avatar

    Awesome kata, props to author for making this (y) ;)

  • redkaPG Avatar

    Most of the solutions did not use the integer division requirement, please "Vote up" those which do. Thank you :)

  • KroNko1808 Avatar

    I think division by 0 should return infinity instead of 0.

  • ChrisMassie Avatar

    I like this challenge, but I don't like that it requires division by 0 to return 0 rather than NaN or infinity.

  • Chrono79 Avatar

    This comment has been hidden.

  • hobovsky Avatar

    This comment has been hidden.

  • griffinleow Avatar

    Thanks @BattleRattle for this Kata! Learnt something new today almost functional programming.

  • fahall Avatar

    Python 3.6.0 Version tests for regular division in random tests. It returns failures on floor division. Instructions call for floor division. Example Output:

    Time: 553ms Passed: 140 Failed: 24
    Test Results:
    Basic Tests
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Random Tests
    Testing for four(plus(five()))
    Testing for four(minus(eight()))
    Testing for three(times(two()))
    Testing for eight(divided_by(two()))
    Testing for zero(plus(nine()))
    Testing for three(minus(one()))
    Testing for six(times(four()))
    Testing for five(divided_by(eight()))
    0 should equal 0.625
    Testing for three(plus(nine()))
    Testing for six(minus(six()))
    Testing for two(times(three()))
    Testing for seven(divided_by(three()))
    2 should equal 2.3333333333333335
    Testing for six(plus(three()))
    Testing for eight(minus(six()))
    Testing for zero(times(three()))
    Testing for five(divided_by(eight()))
    0 should equal 0.625
    Testing for four(plus(one()))
    Testing for three(minus(zero()))
    Testing for seven(times(eight()))
    Testing for one(divided_by(two()))
    0 should equal 0.5
    Testing for six(plus(eight()))
    Testing for seven(minus(nine()))
    Testing for three(times(three()))
    Testing for four(divided_by(one()))
    Testing for seven(plus(two()))
    Testing for eight(minus(nine()))
    Testing for four(times(seven()))
    Testing for four(divided_by(four()))
    Testing for six(plus(zero()))
    Testing for one(minus(five()))
    Testing for six(times(three()))
    Testing for six(divided_by(two()))
    Testing for six(plus(two()))
    Testing for nine(minus(zero()))
    Testing for three(times(zero()))
    Testing for four(divided_by(eight()))
    0 should equal 0.5
    Testing for five(plus(eight()))
    Testing for eight(minus(six()))
    Testing for three(times(six()))
    Testing for zero(divided_by(seven()))
    Testing for zero(plus(two()))
    Testing for four(minus(two()))
    Testing for zero(times(three()))
    Testing for eight(divided_by(two()))
    Testing for two(plus(zero()))
    Testing for three(minus(eight()))
    Testing for nine(times(seven()))
    Testing for three(divided_by(three()))
    Testing for one(plus(eight()))
    Testing for six(minus(three()))
    Testing for five(times(seven()))
    Testing for one(divided_by(seven()))
    0 should equal 0.14285714285714285
    Testing for eight(plus(four()))
    Testing for three(minus(four()))
    Testing for nine(times(eight()))
    Testing for seven(divided_by(four()))
    1 should equal 1.75
    Testing for five(plus(zero()))
    Testing for nine(minus(nine()))
    Testing for zero(times(six()))
    Testing for zero(divided_by(three()))
    Testing for five(plus(two()))
    Testing for six(minus(three()))
    Testing for two(times(nine()))
    Testing for zero(divided_by(eight()))
    Testing for four(plus(five()))
    Testing for nine(minus(three()))
    Testing for nine(times(nine()))
    Testing for eight(divided_by(nine()))
    0 should equal 0.8888888888888888
    Testing for nine(plus(seven()))
    Testing for six(minus(nine()))
    Testing for eight(times(five()))
    Testing for six(divided_by(nine()))
    0 should equal 0.6666666666666666
    Testing for one(plus(nine()))
    Testing for three(minus(two()))
    Testing for six(times(seven()))
    Testing for nine(divided_by(four()))
    2 should equal 2.25
    Testing for four(plus(four()))
    Testing for eight(minus(two()))
    Testing for eight(times(eight()))
    Testing for eight(divided_by(three()))
    2 should equal 2.6666666666666665
    Testing for two(plus(six()))
    Testing for six(minus(five()))
    Testing for two(times(five()))
    Testing for one(divided_by(three()))
    0 should equal 0.3333333333333333
    Testing for one(plus(nine()))
    Testing for zero(minus(nine()))
    Testing for seven(times(four()))
    Testing for four(divided_by(nine()))
    0 should equal 0.4444444444444444
    Testing for four(plus(five()))
    Testing for nine(minus(two()))
    Testing for five(times(eight()))
    Testing for seven(divided_by(one()))
    Testing for one(plus(eight()))
    Testing for eight(minus(one()))
    Testing for seven(times(three()))
    Testing for eight(divided_by(nine()))
    0 should equal 0.8888888888888888
    Testing for seven(plus(eight()))
    Testing for eight(minus(five()))
    Testing for two(times(two()))
    Testing for three(divided_by(three()))
    Testing for zero(plus(three()))
    Testing for three(minus(eight()))
    Testing for three(times(six()))
    Testing for five(divided_by(eight()))
    0 should equal 0.625
    Testing for three(plus(three()))
    Testing for zero(minus(one()))
    Testing for eight(times(six()))
    Testing for seven(divided_by(eight()))
    0 should equal 0.875
    Testing for zero(plus(eight()))
    Testing for six(minus(one()))
    Testing for two(times(seven()))
    Testing for nine(divided_by(three()))
    Testing for three(plus(six()))
    Testing for eight(minus(nine()))
    Testing for one(times(one()))
    Testing for eight(divided_by(seven()))
    1 should equal 1.1428571428571428
    Testing for four(plus(six()))
    Testing for three(minus(zero()))
    Testing for zero(times(nine()))
    Testing for six(divided_by(two()))
    Testing for four(plus(four()))
    Testing for three(minus(eight()))
    Testing for four(times(seven()))
    Testing for one(divided_by(nine()))
    0 should equal 0.1111111111111111
    Testing for four(plus(two()))
    Testing for five(minus(eight()))
    Testing for zero(times(zero()))
    Testing for five(divided_by(seven()))
    0 should equal 0.7142857142857143
    Testing for five(plus(one()))
    Testing for one(minus(four()))
    Testing for four(times(six()))
    Testing for seven(divided_by(eight()))
    0 should equal 0.875
    Testing for one(plus(four()))
    Testing for four(minus(seven()))
    Testing for nine(times(four()))
    Testing for five(divided_by(eight()))
    0 should equal 0.625
    Testing for eight(plus(one()))
    Testing for zero(minus(five()))
    Testing for four(times(three()))
    Testing for eight(divided_by(five()))
    1 should equal 1.6
    Testing for three(plus(eight()))
    Testing for one(minus(nine()))
    Testing for seven(times(seven()))
    Testing for six(divided_by(two()))
    Testing for nine(plus(five()))
    Testing for one(minus(four()))
    Testing for six(times(two()))
    Testing for one(divided_by(nine()))
    0 should equal 0.1111111111111111
    Testing for five(plus(six()))
    Testing for one(minus(eight()))
    Testing for two(times(six()))
    Testing for one(divided_by(nine()))
    0 should equal 0.1111111111111111
    Testing for seven(plus(one()))
    Testing for three(minus(one()))
    Testing for five(times(eight()))
    Testing for zero(divided_by(two()))
    Testing for one(plus(nine()))
    Testing for five(minus(seven()))
    Testing for two(times(zero()))
    Testing for six(divided_by(two()))
    
  • Wolfmans55 Avatar

    It keeps saying "Document not defined"

    I have the solve in JS, works in codepen/jsfiddle. This is driving me crazy that I can't mark it as solved...

  • yooyhung Avatar

    should it be "eight(divided_by(three()))" on the kata description?

  • francjpd Avatar

    LOVED this kata :). amazing job.

  • fenring76 Avatar

    This comment has been hidden.

  • AurelieBayre Avatar

    This kata is excellent! I first tried a month ago and couldn't do it. Then I heard about functional programming and I got it.

  • SlicesOfPi Avatar

    This is coding gore.

  • joe111 Avatar

    I havn't finnished this yet, but I like how it's testing my knowledge rather than my problem solving abilities. I will figure this one out eventually

  • elanamig Avatar

    I have a solution, but I can't submit it because it tells me that I have gone over my IP limit and to try again in 30 seconds? I wait (for hours even), and try again and get the same error... Has anyone seen this before? I would appreciate any help!

    PS - this happens with every problem on Codewars. Started today.

    Thank you

  • ds_one Avatar

    This comment has been hidden.

  • dennistang Avatar

    This kata was fun, had to put my functional hat on!

  • Sakramento Avatar

    This comment has been hidden.

  • dfrho Avatar

    I have my solution but cannot click submit because the CodeWars Pro modal is blocking the buttons. Clicking X to remove it doesn't work. Chrome Browser Version 54.0.2840.98 (64-bit).

  • nivla Avatar

    this kata was very pretty fun indeed.

  • docgunthrop Avatar

    this was a fun practice kata. thank you for providing this, BattleRattle.

  • qfgg Avatar

    This one is so awesome! Thank you gugs. Most of your solutions teach me a lot.

  • Austio Avatar

    This comment has been hidden.

  • soanvig Avatar

    Ruby metaprogramming says hello to other languages :D Very nice kata!

  • GiacomoSorbi Avatar

    Python translation submitted, and it was really fun to create:)

  • ryanq214 Avatar

    This comment has been hidden.

  • user3629691 Avatar

    Loved this kata. Very illustrative of the differences between JavaScript and Ruby.

  • paceaux Avatar

    This comment has been hidden.

  • SashaEgorov Avatar

    Amazing kata. Thank you guys.

  • abramenal Avatar

    rly enjoyed this kata

  • hbakhtiyor Avatar

    CS translation provided, with CS will be more fun, like

    four plus nine() #=> 13
    
  • adambernstein Avatar

    A solution to this kata came to me in my sleep. (Admittedly it was not the most clever solution, but I passed the kata after dreaming up some code!)

  • CrociDB Avatar

    Very interesting kata. A good example on how to use closures. I'm currently learning functional programming and this was a good start. :)

  • bema Avatar

    This was a really nice Kata!

  • alkimo Avatar

    Damn, I'm stuck! Don't know what to do here at all. Gonna lurk around a little bit, I hope I can make this soon.

  • hksong Avatar

    This comment has been hidden.