[{"data":1,"prerenderedAt":240},["ShallowReactive",2],{"term-f\u002Ffunctional-programming":3,"related-f\u002Ffunctional-programming":223},{"id":4,"title":5,"acronym":6,"body":7,"category":204,"description":205,"difficulty":206,"extension":207,"letter":208,"meta":209,"navigation":96,"path":210,"related":211,"seo":217,"sitemap":218,"stem":221,"subcategory":6,"__hash__":222},"terms\u002Fterms\u002Ff\u002Ffunctional-programming.md","Functional Programming",null,{"type":8,"value":9,"toc":198},"minimark",[10,15,19,23,26,30,187,191,194],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Functional programming is like cooking with strict rules: no shared bowls, no side dishes contaminating each other, and every dish must be exactly reproducible from the recipe. Functions take ingredients in and produce output — they never secretly modify the pantry.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Functional Programming is a paradigm that treats computation as the evaluation of pure functions, avoiding shared mutable state and side effects. It emphasises immutability, first-class functions, and declarative style via tools like map, filter, and reduce.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const numbers = [1, 2, 3, 4, 5];\n\n\u002F\u002F FP style: no mutation, chained transforms\nconst result = numbers\n  .filter(n => n % 2 === 0)\n  .map(n => n * 2);\n\u002F\u002F [4, 8]\n","javascript","",[38,39,40,91,98,105,118,155,181],"code",{"__ignoreMap":36},[41,42,45,49,53,57,60,64,67,70,72,75,77,80,82,85,88],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"spNyl","const",[41,50,52],{"class":51},"sTEyZ"," numbers ",[41,54,56],{"class":55},"sMK4o","=",[41,58,59],{"class":51}," [",[41,61,63],{"class":62},"sbssI","1",[41,65,66],{"class":55},",",[41,68,69],{"class":62}," 2",[41,71,66],{"class":55},[41,73,74],{"class":62}," 3",[41,76,66],{"class":55},[41,78,79],{"class":62}," 4",[41,81,66],{"class":55},[41,83,84],{"class":62}," 5",[41,86,87],{"class":51},"]",[41,89,90],{"class":55},";\n",[41,92,94],{"class":43,"line":93},2,[41,95,97],{"emptyLinePlaceholder":96},true,"\n",[41,99,101],{"class":43,"line":100},3,[41,102,104],{"class":103},"sHwdD","\u002F\u002F FP style: no mutation, chained transforms\n",[41,106,108,110,113,115],{"class":43,"line":107},4,[41,109,48],{"class":47},[41,111,112],{"class":51}," result ",[41,114,56],{"class":55},[41,116,117],{"class":51}," numbers\n",[41,119,121,124,128,131,135,138,141,144,146,149,152],{"class":43,"line":120},5,[41,122,123],{"class":55},"  .",[41,125,127],{"class":126},"s2Zo4","filter",[41,129,130],{"class":51},"(",[41,132,134],{"class":133},"sHdIc","n",[41,136,137],{"class":47}," =>",[41,139,140],{"class":51}," n ",[41,142,143],{"class":55},"%",[41,145,69],{"class":62},[41,147,148],{"class":55}," ===",[41,150,151],{"class":62}," 0",[41,153,154],{"class":51},")\n",[41,156,158,160,163,165,167,169,171,174,176,179],{"class":43,"line":157},6,[41,159,123],{"class":55},[41,161,162],{"class":126},"map",[41,164,130],{"class":51},[41,166,134],{"class":133},[41,168,137],{"class":47},[41,170,140],{"class":51},[41,172,173],{"class":55},"*",[41,175,69],{"class":62},[41,177,178],{"class":51},")",[41,180,90],{"class":55},[41,182,184],{"class":43,"line":183},7,[41,185,186],{"class":103},"\u002F\u002F [4, 8]\n",[11,188,190],{"id":189},"when-youll-hear-this","When You'll Hear This",[16,192,193],{},"\"We adopted a functional programming style to make the data pipeline easier to test.\" \u002F \"Pure functions and no side effects — that's the FP way.\"",[195,196,197],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":93,"depth":93,"links":199},[200,201,202,203],{"id":13,"depth":93,"text":14},{"id":21,"depth":93,"text":22},{"id":28,"depth":93,"text":29},{"id":189,"depth":93,"text":190},"general","Functional programming is like cooking with strict rules: no shared bowls, no side dishes contaminating each other, and every dish must be exactly reproduc...","intermediate","md","f",{},"\u002Fterms\u002Ff\u002Ffunctional-programming",[212,213,214,215,216],"Pure Function","Side Effect","Idempotent","OOP","Method",{"title":5,"description":205},{"changefreq":219,"priority":220},"weekly",0.7,"terms\u002Ff\u002Ffunctional-programming","7OYx7w-AwWA8a7XAo8tbv791Yoaxv7jfgibmNOALg2E",[224,227,231,234,237],{"title":214,"path":225,"acronym":6,"category":204,"difficulty":206,"description":226},"\u002Fterms\u002Fi\u002Fidempotent","Idempotent means you can do the same thing multiple times and get the same result as doing it once.",{"title":216,"path":228,"acronym":6,"category":204,"difficulty":229,"description":230},"\u002Fterms\u002Fm\u002Fmethod","beginner","A method is just a function that belongs to an object or class. Your Dog object has a bark() method — it's the dog's personal function.",{"title":215,"path":232,"acronym":215,"category":204,"difficulty":206,"description":233},"\u002Fterms\u002Fo\u002Foop","OOP is a way of organising code by modelling the world as objects — things that have properties (what they are) and methods (what they do).",{"title":212,"path":235,"acronym":6,"category":204,"difficulty":206,"description":236},"\u002Fterms\u002Fp\u002Fpure-function","A pure function is the well-behaved kid of programming.",{"title":213,"path":238,"acronym":6,"category":204,"difficulty":206,"description":239},"\u002Fterms\u002Fs\u002Fside-effect","A side effect is when a function secretly does something beyond just giving you an answer — like changing a global variable, writing to a file, or sending...",1776518282588]