[{"data":1,"prerenderedAt":209},["ShallowReactive",2],{"project-24089550":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":41,"post_text":44,"what":45,"said":55,"maker_in_thread":124,"shape":126,"grid":129,"attempts":168,"same_week":173,"maker_shows":33,"maker_hidden":201,"reader_version":202,"card":203},"24089550","Omg-Curry","JavaScript currying library","title","Show HN: Omg-Curry – JavaScript currying library","https:\u002F\u002Fgithub.com\u002FDebdut\u002Fomg-curry","github.com","debdut",1596868078,2020,11,16,2323,3028,77,"shown","languages","javascript library","library",[24,25,26,27],"javascript","currying","functional programming","partial application","mixed",0.019,{"positive":31,"neutral":31,"mixed":32,"critical":33},4,0,2,10,{"execution":36,"idea":38,"design":39,"docs":40},{"positive":32,"critical":37},1,{"positive":31,"critical":37},{"positive":32,"critical":32},{"positive":32,"critical":32},[37,32,32,42,42,42,32,37,43,32,43,43,43,42,32,32],3,5,null,{"problem":44,"audience":44,"pricing":44,"motivation":44,"time_to_build":44,"stack":46,"openness":53,"stage":54,"team_size":54},[47],{"value":48,"source":49,"evidence":50},"JavaScript","maker",[51],{"id":52},"post","open_source","unknown",{"praise":56,"objections":69,"requests":84,"questions":92,"alternatives":104},[57],{"value":58,"source":59,"evidence":60},"Currying is useful with functional composition and list iteration","commenter",[61,65],{"id":62,"by":63,"text":64},"24115352","oweiler","Currying becomes useful in tandem with functional composition.",{"id":66,"by":67,"text":68},"24117319","smichel17","It's nice for any type of list iteration. I'll share my \"match\" function (for use when filtering) when I'm at my computer tomorrow.",[70,77],{"value":71,"source":59,"evidence":72},"Currying in dynamic languages masks bugs and gives cluttered stack traces",[73],{"id":74,"by":75,"text":76},"24114546","ufo","I had mixed results in the past when I tried to use currying in Javascript. The stack traces were cluttered by references to the currying function and it also masked bugs if you…",{"value":78,"source":59,"evidence":79},"The add example is boring and unconvincing as a use case",[80],{"id":81,"by":82,"text":83},"24115242","gitgud","Sorry I'm not that familiar with this. What would be a good use-case for currying? The example doesn't feel that exciting... ``` add4(1)(3)(5)(10) add4(1)(3,5)(10) add4(1,3,5,10)…",[85],{"value":86,"source":59,"evidence":87},"Support for currying arguments in any order using placeholders",[88],{"id":89,"by":90,"text":91},"24115100","javajosh","I like this too (and use a version myself) however this form only supports one argument at a time. E.g. add(1,2) is going to return the curry of add(1), which is not what you…",[93,97],{"value":94,"source":59,"evidence":95},"What is a good use case for currying in JavaScript?",[96],{"id":81,"by":82,"text":83},{"value":98,"source":59,"evidence":99},"How does currying work with TypeScript?",[100],{"id":101,"by":102,"text":103},"24117826","tutfbhuf","How about Typescript then?",[105,112,118],{"value":106,"source":59,"evidence":107},"Native arrow function currying",[108],{"id":109,"by":110,"text":111},"24114660","brundolf","JavaScript actually has a pretty ergonomic way of doing currying natively: ``` const add = (a) => (b) => a + b; [1, 2, 3, 4].map(add(2)); \u002F\u002F [3, 4, 5, 6] ```",{"value":113,"source":59,"evidence":114},"Lodash _.curry and _.partial",[115],{"id":116,"by":75,"text":117},"24116871","The add example is a bit boring because all the arguments are the same \"kind\". Partial evaluation is more interesting if the arguments are more independent. To borrow a contrived…",{"value":119,"source":59,"evidence":120},"Pipeline operator proposal",[121],{"id":122,"by":110,"text":123},"24115867","What it ends up being for normal usage is something like this: ``` add(1)(2) ``` Which is admittedly a little bit clunky, though from a quick read I don't think the library helps…",{"comments":32,"answered":32,"key":125},[],{"commenters":14,"max_depth":31,"maker_replies":32,"first_comment_mins":127,"lifespan_hours":128},3813,394,[130,132,134,136,138,139,141,144,146,148,152,153,154,156,160,164],[74,32,37,131,75,32],"project\u002Fcritical\u002Fexecution",[101,32,32,133,102,32],"commenter\u002Fneutral\u002Fnone",[135,32,32,133,75,32],"24120136",[109,37,42,137,110,32],"project\u002Fneutral\u002Fidea",[89,37,42,137,90,32],[122,37,42,140,110,32],"project\u002Fneutral\u002Fdesign",[142,37,32,143,90,32],"24115883","commenter\u002Fneutral\u002Fdesign",[81,33,37,145,82,32],"project\u002Fcritical\u002Fidea",[62,33,43,147,63,32],"project\u002Fpositive\u002Fidea",[149,33,32,150,151,32],"24117669","other\u002Fneutral\u002Fidea","DiffProg",[116,33,43,147,75,32],[66,33,43,147,67,32],[155,33,43,147,67,32],"24262038",[157,42,42,158,159,32],"24114530","project\u002Fneutral\u002Fdocs","giancarlostoro",[161,31,32,162,163,32],"24115068","other\u002Fneutral\u002Fnone","finnh",[165,43,32,166,167,32],"24114831","other\u002Fcritical\u002Fidea","randompwd",[169,170],{"id":4,"t":12,"points":14,"comments":15},{"id":171,"t":172,"points":37,"comments":32},"26310781",1614648028,[174,179,183,188,193,197],{"id":175,"name":176,"points":177,"category":178},"24079592","Hndex.org",442,"data",{"id":180,"name":181,"points":182,"category":178},"24120325","EventNative",228,{"id":184,"name":185,"points":186,"category":187},"24132631","Kinopio.club",181,"productivity",{"id":189,"name":190,"points":191,"category":192},"24099037","Kowl",164,"infrastructure",{"id":194,"name":195,"points":196,"category":178},"24131723","dstack",134,{"id":198,"name":199,"points":200,"category":178},"24119113","Jet",129,false,"v2",{"id":204,"name":5,"line":6,"ai":201,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":205,"top":18,"kw":206,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":207,"url":9,"mix":208,"praise":58,"objection":71,"sub":21},24089550,0.02,[24,25,26,27],"1003330150555300",[31,31,32,33],1794036594475]