CINXE.COM

pure functions - Google Search

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en-SG"><head><meta content="application/xhtml+xml; charset=UTF-8" http-equiv="Content-Type"/><meta content="no-cache" name="Cache-Control"/><title>pure functions - Google Search</title><style>a{text-decoration:none;color:inherit}a:hover{text-decoration:underline}a img{border:0}body{font-family:sans-serif;padding:8px;margin:0 auto;max-width:700px;min-width:240px;}.FbhRzb{border-left:thin solid #dadce0;border-right:thin solid #dadce0;border-top:thin solid #dadce0;height:40px;overflow:hidden}.n692Zd{margin-bottom:10px}.cvifge{height:40px;border-spacing:0}.QvGUP{height:40px;padding:0 8px 0 8px;vertical-align:top}.O4cRJf{height:40px;width:100%;padding:0;padding-right:16px}.O1ePr{height:40px;padding:0;vertical-align:top}.kgJEQe{height:36px;width:98px;vertical-align:top;margin-top:4px}.lXLRf{vertical-align:top}.MhzMZd{border:0;vertical-align:middle;font-size:14px;height:40px;padding:0;width:100%;padding-left:16px}.xB0fq{height:40px;border:none;font-size:14px;background-color:#1a73e8;color:#fff;padding:0 16px;margin:0;vertical-align:top;cursor:pointer}.xB0fq:focus{border:1px solid #1a73e8}.M7pB2{border:thin solid #dadce0;margin:0 0 3px 0;font-size:13px;font-weight:500;height:40px}.euZec{width:100%;height:40px;text-align:center;border-spacing:0}table.euZec td{padding:0;width:25%}.QIqI7{display:inline-block;padding-top:4px;font-weight:bold;color:#4285f4}.EY24We{border-bottom:2px solid #4285f4}.CsQyDc{display:inline-block;color:#70757a}.TuS8Ad{font-size:14px}.HddGcc{padding:8px;color:#70757a}.dzp8ae{font-weight:bold;color:#3c4043}.rEM8G{color:#70757a}.bookcf{table-layout:fixed;width:100%;border-spacing:0}.InWNIe{text-align:center}.uZgmoc{border:thin solid #dadce0;color:#70757a;font-size:14px;text-align:center;table-layout:fixed;width:100%}.frGj1b{display:block;padding:12px 0 12px 0;width:100%}.BnJWBc{text-align:center;padding:6px 0 13px 0;height:35px}</style></head><body><style>.ezO2md{border:thin solid #dadce0;padding:12px 16px 12px 16px;margin-bottom:10px;font-family:sans-serif}.lIMUZd{font-family:sans-serif}.synv3b{padding-bottom:12px}.FYYwXe{padding-bottom:12px}.oO6lG{padding-top:12px}.LUX65{overflow:hidden;text-align:center}.DT7Nxc{margin:0 auto;display:block}.HeLCGb{margin:0 -50%;display:inline-block}.CSfvHb{padding-bottom:8px}.fYyStc{word-break:break-word}.ynsChf{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.Fj3V3b{color:#1967d2;font-size:14px;line-height:20px}.FrIlee{color:#202124;font-size:13px;line-height:20px}.F9iS2e{color:#70757a;font-size:13px;line-height:20px}.WMQ2Le{color:#70757a;font-size:12px;line-height:16px}.x3G5ab{color:#202124;font-size:18px;line-height:24px}.fuLhoc{color:#1967d2;font-size:18px;line-height:24px}.epoveb{font-size:32px;line-height:40px;font-weight:400;color:#202124}.dXDvrc{color:#0d652d;font-size:14px;line-height:20px;word-wrap:break-word}.dloBPe{font-weight:bold}.YVIcad{color:#70757a}.JkVVdd{color:#ea4335}.oXZRFd{color:#ea4335}.MQHtg{color:#fbbc04}.pyMRrb{color:#1e8e3e}.EtTZid{color:#1e8e3e}.M3vVJe{color:#1967d2}.qXLe6d{display:block}.NHQNef{font-style:italic}.Cb8Z7c{white-space:pre}a.ZWRArf{text-decoration:none}a .CVA68e:hover{text-decoration:underline}.Dks9wf{width:100%}.KZhhub{border-spacing:0;width:100%}.udTCfd{vertical-align:top;width:100%}.GN4D8d{margin:0}.oVt8qe{padding-top:12px}.dBt03e{width:100%;padding-top:12px}.UwfKSd{display:inline-block;padding:2px;padding-bottom:4px}.iUhyd{vertical-align:bottom}.CO79Sb{position:relative}.WQbFld{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;background-image:url(https://www.gstatic.com/search_trustx/visibility_off_icon_p0-7d897bf44bafe5436baa9009e8716337.png);background-repeat:no-repeat;background-position:center;background-size:20px}.ZuwI5d{border-spacing:0;width:100%}.qPa7sb{display:block;float:right;padding-left:16px}.AS66f{padding-top:12px}.SqPqqd{display:block;padding-top:12px}.VeHcBf{border-spacing:0;width:100%;table-layout:auto;padding:4px 0 4px 0}.MGsU1d{text-align:right}</style><div class="n692Zd"><div class="BnJWBc"><a class="lXLRf" href="/?sca_esv=2eee718c337252b9&amp;output=search&amp;sa=X&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQPAgC"><img class="kgJEQe" src="/images/branding/searchlogo/1x/googlelogo_desk_heirloom_color_150x55dp.gif" alt="Google"/></a></div><div class="FbhRzb"><form action="/search"><input name="sca_esv" value="2eee718c337252b9" type="hidden"/><input name="oq" type="hidden"/><input name="aqs" type="hidden"/><table class="cvifge"><tr><td class="O4cRJf"><input class="MhzMZd" value="pure functions" name="q" type="text"/></td><td class="O1ePr"><input class="xB0fq" value="Search" type="submit"/></td></tr></table></form></div><div class="M7pB2"><table class="euZec"><tbody><tr><td class="EY24We"><span class="QIqI7">ALL</span></td><td><a class="CsQyDc" href="/search?q=pure+functions&amp;sca_esv=2eee718c337252b9&amp;tbm=isch&amp;source=lnms&amp;sa=X&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ_AUIBSgB">IMAGES</a></td><td><a class="CsQyDc" href="/search?q=pure+functions&amp;sca_esv=2eee718c337252b9&amp;udm=36&amp;source=lnms&amp;sa=X&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ_AUIBigC">BOOKS</a></td><td><a class="CsQyDc" href="/search?q=pure+functions&amp;sca_esv=2eee718c337252b9&amp;tbm=vid&amp;source=lnms&amp;sa=X&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ_AUIBygD">VIDEOS</a></td></tr></tbody></table></div></div><div><div> <div> <div class="ezO2md"><div><div class="FYYwXe"> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc">A pure function is </span> <span class="dloBPe fYyStc">a function that depends only on its declared inputs and its internal algorithm to produce its output</span> <span class="fYyStc">. It does not read any other values from “the outside world” — the world outside of the function's scope — and it does not modify any values in the outside world.</span> </span> </div> </div><div><a class="fuLhoc ZWRArf" href="/url?q=https://docs.scala-lang.org/overviews/scala-book/pure-functions.html&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAMQAg&amp;usg=AOvVaw1G1rklXPpqyKlYrgQbTNTt"><span class="CVA68e qXLe6d">Pure Functions | Scala Book</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">docs.scala-lang.org › overviews › scala-book › pure-functions</span> </span> </a></div><div class="oO6lG"> <span class="qXLe6d F9iS2e WMQ2Le"> <a class="M3vVJe" href="https://www.google.com/url?q=https://support.google.com/websearch%3Fp%3Dfeatured_snippets%26hl%3Den-SG&amp;opi=89978449&amp;usg=AOvVaw0XmUePKqidLOPpq7KneD4H">About featured snippets</a> </span> </div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://en.wikipedia.org/wiki/Pure_function&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAkQAg&amp;usg=AOvVaw0G0nx5iGbTs_o2UEqT5Y_w"><span class="CVA68e qXLe6d fuLhoc ZWRArf">Pure function - Wikipedia</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">en.wikipedia.org › wiki › Pure_function</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc">In computer programming, a pure function is a function that has the following properties: the function return values are identical for identical arguments ...</span> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/url?q=https://en.wikipedia.org/wiki/Pure_function%23Examples&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ0gJ6BAgJEAU&amp;usg=AOvVaw3Jf6yPJ_kBz9E-64kM0u1f">Examples</a> <span class="fYyStc"> · </span> <a class="M3vVJe" href="/url?q=https://en.wikipedia.org/wiki/Pure_function%23I/O_in_pure_functions&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ0gJ6BAgJEAY&amp;usg=AOvVaw0edB973TV4Aey9lB6miNO4">I/O in pure functions</a> <span class="fYyStc"> · </span> <a class="M3vVJe" href="/url?q=https://en.wikipedia.org/wiki/Pure_function%23Memoization&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ0gJ6BAgJEAc&amp;usg=AOvVaw0_6RQJPJz4WzBDefLYNZvl">Memoization</a> <span class="fYyStc"> · </span> <a class="M3vVJe" href="/url?q=https://en.wikipedia.org/wiki/Pure_function%23Compiler_optimizations&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ0gJ6BAgJEAg&amp;usg=AOvVaw0DwuMJ3xbYbVhUvA9AzcUc">Compiler optimizations</a> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://www.geeksforgeeks.org/pure-functions-in-javascript/&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAQQAg&amp;usg=AOvVaw263exSmxA7GIl7qhrW4Slr"><span class="CVA68e qXLe6d fuLhoc ZWRArf">Pure Functions in JavaScript - GeeksforGeeks</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">www.geeksforgeeks.org › pure-functions-in-javascript</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">17 Dec 2024</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">A Pure Function is a function (a block of code) that always returns the same result if the same arguments are passed. Pure functions return ...</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-pure-function-d1c076bec976&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAEQAg&amp;usg=AOvVaw0R0V9tqgCvZTR20PdvfWFE"><span class="CVA68e qXLe6d fuLhoc ZWRArf">Master the JavaScript Interview: What is a Pure Function? - Medium</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">medium.com › javascript-scene › master-the-javascript-interview-what-is-a-...</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">25 Mar 2016</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">Pure functions take some input and return some output based on that input. They are the simplest reusable building blocks of code in a program.</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://stackoverflow.com/questions/55815641/what-exactly-is-a-pure-function-when-we-are-talking-about-a-function-within-a-fu&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAYQAg&amp;usg=AOvVaw3lQUTrwPbsVEM8RYAcf-8S"><span class="CVA68e qXLe6d fuLhoc ZWRArf">What exactly is a pure function when we are talking about a function ...</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">stackoverflow.com › questions › what-exactly-is-a-pure-function-when-we...</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">23 Apr 2019</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">A pure function is a function that meets 2 requirements: Given the same input, it will always return the same output.</span> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/url?q=https://stackoverflow.com/questions/22268851/what-is-a-pure-function&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQrAJ6BAgGEAY&amp;usg=AOvVaw0tIPoYY8b-z41oHJcXHKBn">What is a pure function? - Stack Overflow</a> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/url?q=https://stackoverflow.com/questions/11153796/benefits-of-pure-function&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQrAJ6BAgGEAc&amp;usg=AOvVaw2i5N-Rm3-SrDMxjhZddaPZ">Benefits of pure function - Stack Overflow</a> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/url?q=https://stackoverflow.com/questions/66124336/is-there-a-performance-penalty-for-using-pure-functions-with-heavy-arguments&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQrAJ6BAgGEAg&amp;usg=AOvVaw0UvGsu-1FHVhl_egCjrOa7">Is there a performance penalty for using pure functions with heavy ...</a> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/url?q=https://stackoverflow.com/questions/77516467/how-to-correctly-identify-pure-functions-in-functional-programming&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQrAJ6BAgGEAk&amp;usg=AOvVaw3Pq4kmm7c-5IXNOtpM-6e8">How to correctly identify pure functions in functional programming?</a> </span> <span class="qXLe6d FrIlee"> <a class="M3vVJe" href="/search?q=pure+functions+site:stackoverflow.com&amp;sca_esv=2eee718c337252b9">More results from stackoverflow.com</a> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://react.dev/learn/keeping-components-pure&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAUQAg&amp;usg=AOvVaw1lUXcgNNfGH0Y4TLZP-RtE"><span class="CVA68e qXLe6d fuLhoc ZWRArf">Keeping Components Pure - React</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">react.dev › learn › keeping-components-pure</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc">Some JavaScript functions are pure. Pure functions only perform a calculation and nothing more. By strictly only writing your components as pure functions ...</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div> <span class="qXLe6d x3G5ab"> <a class="dloBPe x3G5ab" href="https://www.google.com/search?sca_esv=2eee718c337252b9&amp;ei=SYq3Z9izNqfhseMPq7bDsQc&amp;q=pure+functions&amp;tbm=isch&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQsAR6BAgCEAE">Images</a> </span> <span class="qXLe6d F9iS2e"> <a class="M3vVJe" href="https://www.google.com/search?sca_esv=2eee718c337252b9&amp;ei=SYq3Z9izNqfhseMPq7bDsQc&amp;q=pure+functions&amp;tbm=isch&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ7Al6BAgCEAI">View all</a> </span> <div class="dBt03e"> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://cdn-media-1.freecodecamp.org/images/0*a_yub2gTwY-1eK8j.png&amp;imgrefurl=https://www.freecodecamp.org/news/what-is-a-pure-function-in-javascript-acb887375dfe/&amp;h=771&amp;w=737&amp;tbnid=OZUx99YtZG-7IM&amp;q=pure+functions&amp;tbnh=142&amp;tbnw=136&amp;usg=AI4_-kSLCt2xhIdHvyZlXRT3bjqF1Ap2pg&amp;vet=1&amp;docid=KLFh9NIM01ZJHM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEAQ"> <div class="CO79Sb"> <img class="iUhyd" alt="What Is a Pure Function in JavaScript?" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQAeun7idNsX_E_hRwgbVKOo61GqJcwPMVd1dvbPdNGix3PCVJVwLwt6UI&amp;s" style="width:86px;height:90px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://miro.medium.com/v2/resize:fit:1400/1*fgISuw7tNhiznpByJIDhIQ.png&amp;imgrefurl=https://medium.com/geekculture/pure-vs-impure-functions-3f8693edf69b&amp;h=700&amp;w=1400&amp;tbnid=gLVdWh8MODv72M&amp;q=pure+functions&amp;tbnh=75&amp;tbnw=150&amp;usg=AI4_-kQhjkXRiRuwQer0stNwcqL6ti-9uQ&amp;vet=1&amp;docid=MpcyYpoJ-OVjGM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEAY"> <div class="CO79Sb"> <img class="iUhyd" alt="Pure vs Impure Functions. These are the two terms that you always ..." src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQzcXaHm8_m3naX2brPecbmf1_oZdQq10qZN0_4-Y3nArgbWG4ZB-nW6Gc&amp;s" style="width:120px;height:60px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://www.syncfusion.com/blogs/wp-content/uploads/2022/01/Pure-and-Impure-Functions-in-JavaScript.png&amp;imgrefurl=https://www.syncfusion.com/blogs/post/pure-impure-functions-javascript/amp&amp;h=468&amp;w=624&amp;tbnid=BHTG470Nk6TtPM&amp;q=pure+functions&amp;tbnh=102&amp;tbnw=136&amp;usg=AI4_-kSe5CGo2g05Nn8RVOezzNQInfZPdQ&amp;vet=1&amp;docid=lec8IMOXy6Gg8M&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEAg"> <div class="CO79Sb"> <img class="iUhyd" alt="Pure and Impure Functions in JavaScript: A Complete Guide" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSyzmm5CUOyzUyZqAOh_UFCQLeiK-QgnMv9S9mzZvnwSNtzySdF1vYDUv3G&amp;s" style="width:120px;height:90px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://i0.wp.com/learnersbucket.com/wp-content/uploads/2023/03/pure-Function1.png?fit%3D600%252C400%26ssl%3D1&amp;imgrefurl=https://learnersbucket.com/tutorials/es6/what-are-pure-and-impure-function-in-javascript/&amp;h=400&amp;w=600&amp;tbnid=ATUbzI1_4Ft23M&amp;q=pure+functions&amp;tbnh=90&amp;tbnw=135&amp;usg=AI4_-kQXWUPp8pRELAbX5lBKhZm3ZYDPmg&amp;vet=1&amp;docid=hRndvsWrBUaZSM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEAo"> <div class="CO79Sb"> <img class="iUhyd" alt="What are Pure and Impure functions in JavaScript - LearnersBucket" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSPcvXYBFsv39J39dk1UAcHnZJNwtd3EPlxracOr4AMROCSjHnnGAYeentz&amp;s" style="width:120px;height:80px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://www.modernescpp.com/wp-content/uploads/2017/01/PureImpureFunctionsEng.png&amp;imgrefurl=https://www.modernescpp.com/index.php/pure-functions/&amp;h=229&amp;w=867&amp;tbnid=idJPliwq7fYGmM&amp;q=pure+functions&amp;tbnh=38&amp;tbnw=145&amp;usg=AI4_-kQFYjOgvPnLedt_csJyo_fhkWZoQA&amp;vet=1&amp;docid=6R7go8nh0fsQpM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEAw"> <div class="CO79Sb"> <img class="iUhyd" alt="Pure Functions – MC++ BLOG" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR-A5_NHumW4vB31C6I46qgE5pLbRyiriATyL7fkX8_E8uYHO66JqaihJNo&amp;s" style="width:120px;height:31px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://miro.medium.com/v2/resize:fit:1400/1*_Xyo9YJ2n6yI7X70Bu7QHA.png&amp;imgrefurl=https://rahuljain-dev.medium.com/understanding-pure-and-impure-functions-in-javascript-a-key-to-efficient-code-96859f379f6e&amp;h=714&amp;w=1250&amp;tbnid=UC8Dd3ClhSCn3M&amp;q=pure+functions&amp;tbnh=86&amp;tbnw=150&amp;usg=AI4_-kTAQ49QutZZep0JESg5dA3ZGtfJjQ&amp;vet=1&amp;docid=xw8gXGzEf_z1aM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEA4"> <div class="CO79Sb"> <img class="iUhyd" alt="Understanding Pure and Impure Functions in JavaScript: A Key to ..." src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4rJUh08R-nJeFHnLPtHpg83kNXDPvGHtm2SeDOEmTkzM_vtwKt9aVpMM&amp;s" style="width:120px;height:68px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://courses.cs.washington.edu/courses/cse341/03sp/slides/Lisp3/img015.GIF&amp;imgrefurl=https://courses.cs.washington.edu/courses/cse341/03sp/slides/Lisp3/sld015.htm&amp;h=768&amp;w=1024&amp;tbnid=Nku8XCrZLE2NgM&amp;q=pure+functions&amp;tbnh=113&amp;tbnw=150&amp;usg=AI4_-kQa3pQ9HXX0r7K4xF4zwxzhWM0paw&amp;vet=1&amp;docid=k8bUxV-9xMvddM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEBA"> <div class="CO79Sb"> <img class="iUhyd" alt="Pure Functions" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSUgiLmGcYGvNpt0LpJtubMM-X5VvevIb6ZjgpGJSqIps82FLufNfHVUk7S&amp;s" style="width:120px;height:90px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://allma.si/blog/wp-content/uploads/2020/11/pure-functions.png&amp;imgrefurl=https://webtips.dev/webtips/javascript-interview/what-is-a-pure-function&amp;h=1200&amp;w=1200&amp;tbnid=A31GOugtotwOtM&amp;q=pure+functions&amp;tbnh=150&amp;tbnw=150&amp;usg=AI4_-kSYMx5ihxpwlVlOHuywaTIbyqth1A&amp;vet=1&amp;docid=6T3glhv7VhxFTM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEBI"> <div class="CO79Sb"> <img class="iUhyd" alt="What is a Pure Function? - Webtips" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRrGIUox56bwb5LlqgVGQOfB2Ha08u08cbPc5lEe850RhBfOahn9Xsw2EA&amp;s" style="width:90px;height:90px"/> </div> </a> <a class="UwfKSd" href="https://www.google.com/imgres?imgurl=https://i.ytimg.com/vi/fs8jgUMsaL8/hq720.jpg?sqp%3D-oaymwEhCK4FEIIDSFryq4qpAxMIARUAAAAAGAElAADIQj0AgKJD%26rs%3DAOn4CLBmENddYieXbhdPecgQ9-SBIVs4dQ&amp;imgrefurl=https://www.youtube.com/watch?v%3Dfs8jgUMsaL8&amp;h=386&amp;w=686&amp;tbnid=QAtvCPownt9K7M&amp;q=pure+functions&amp;tbnh=78&amp;tbnw=139&amp;usg=AI4_-kT0JAMuRLZSsPLfb_I0UWCXV8_pZA&amp;vet=1&amp;docid=SJ79sssNmkTlZM&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ9QF6BAgCEBQ"> <div class="CO79Sb"> <img class="iUhyd" alt="What are pure functions in programming? - YouTube" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHBTSlDdkTZOgk0aiGa1TQsGg8_TFGmpm0g1ICxhYYldI0Y44n6wclK30&amp;s" style="width:120px;height:67px"/> </div> </a> </div> <a class="Fj3V3b" href="https://www.google.com/search?sca_esv=2eee718c337252b9&amp;ei=SYq3Z9izNqfhseMPq7bDsQc&amp;q=pure+functions&amp;tbm=isch&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ7Al6BAgCEBU">View all</a></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://www.reddit.com/r/learnprogramming/comments/16ynxoo/pure_functions_are_functions_that_have_no_side/&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAcQAg&amp;usg=AOvVaw0OVVXGDb9v6hCSHwgzaT85"><span class="CVA68e qXLe6d fuLhoc ZWRArf">"Pure Functions are functions that have no side effects and always ...</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">www.reddit.com › learnprogramming › comments › pure_functions_are_f...</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">3 Oct 2023</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">Pure Functions are functions that have no side effects and always produce the same output for the same input, without modifying any external state.</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><table class="ZuwI5d"><tbody><tr><td> <span class="qXLe6d x3G5ab"> <span class="fYyStc">Pure function</span> </span> </td><td><a href="/url?q=https://www.freecodecamp.org/news/what-is-a-pure-function-in-javascript-acb887375dfe/&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQndQBegQICBAE&amp;usg=AOvVaw11mFMrJ6RyurRacMLKSICp"><img class="qPa7sb" alt="Pure function" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQTCuOLmN7p24fH0LKtgyWUIPtakNCFwaXIZiEY52N7O32zls_qoHEiEw&amp;s=0" style="max-width:72px;max-height:72px"/></a></td></tr></tbody></table></div><div class="AS66f"> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc">In computer programming, a pure function is a function that has the following properties: the function return values are identical for identical arguments, and the function has no side effects.</span> <span class="fYyStc"> </span> <a class="M3vVJe" href="/url?q=https://en.wikipedia.org/wiki/Pure_function&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQmhN6BAgIEAY&amp;usg=AOvVaw0uGGx-gxUelgNkaSOlfOjD">Wikipedia</a> </span> </div> </div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://www.freecodecamp.org/news/what-is-a-pure-function-in-javascript-acb887375dfe/&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAoQAg&amp;usg=AOvVaw2-LsD7Gq6NC3lBKSaCnzht"><span class="CVA68e qXLe6d fuLhoc ZWRArf">What Is a Pure Function in JavaScript? - freeCodeCamp</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">www.freecodecamp.org › news › what-is-a-pure-function-in-javascript-acb...</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">3 Jan 2019</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">Pure functions are the atomic building blocks in functional programming. They are adored for their simplicity and testability.</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div><a class="fuLhoc ZWRArf" href="/url?q=https://dev.to/kjdowns/what-s-a-pure-function-205e&amp;sa=U&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQFnoECAsQAg&amp;usg=AOvVaw1abBf2mrfQsLN4a4RsHgBF"><span class="CVA68e qXLe6d fuLhoc ZWRArf">What's a Pure Function? - DEV Community</span> <span class="qXLe6d dXDvrc"> <span class="fYyStc">dev.to › kjdowns › what-s-a-pure-function-205e</span> </span> </a></div><div class="Dks9wf"><table class="KZhhub"><tr><td class="udTCfd"><div> <div> <span class="qXLe6d FrIlee"> <span class="fYyStc YVIcad">20 Jul 2020</span> <span class="fYyStc YVIcad"> · </span> <span class="fYyStc">Pure functions are a great way to tidy up your code and they are a great way to keep your code scalable and bug free.</span> </span> </div> </div></td></tr></table></div></div></div> </div> </div><div> <div> <div class="ezO2md"><div><div> <span class="qXLe6d x3G5ab"> <span class="dloBPe fYyStc">Related searches</span> </span> </div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+js&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAE"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure functions js</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+js"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+in+java&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAI"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure functions in java</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+in+java"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+example&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAM"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure function example</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+example"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+python&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAQ"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure functions python</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+python"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+in+react&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAU"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure functions in react</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+functions+in+react"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=impure+functions&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAY"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">impure functions</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=impure+functions"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+vs+impure+functions&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAc"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure function vs impure functions</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+vs+impure+functions"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div><div><table class="VeHcBf"><tbody><tr><td><a class="ZWRArf" href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+c%2B%2B&amp;sa=X&amp;ved=2ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQ1QJ6BAgAEAg"><span class="CVA68e qXLe6d"> <span class="qXLe6d FrIlee"> <span class="fYyStc">pure function c++</span> </span> </span></a></td><td><div class="MGsU1d"><a href="/search?sca_esv=2eee718c337252b9&amp;q=pure+function+c%2B%2B"><div class="FrIlee">&gt;</div></a></div></td></tr></tbody></table></div></div></div> </div> </div></div><table class="uZgmoc"><tbody><td><a class="frGj1b" href="/search?q=pure+functions&amp;sca_esv=2eee718c337252b9&amp;ei=SYq3Z9izNqfhseMPq7bDsQc&amp;start=10&amp;sa=N">Next&nbsp;&gt;</a></td></tbody></table><br/><div class="TuS8Ad" data-ved="0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQpyoIYw"><style>.VYM29{font-weight:bold}</style><div class="HddGcc" align="center"><span class="VYM29">Singapore</span><span>&nbsp;-&nbsp;</span><span>From your IP address</span><span>&nbsp;-&nbsp;</span><a href="/url?q=https://support.google.com/websearch%3Fp%3Dws_settings_location%26hl%3Den-SG&amp;opi=89978449&amp;sa=U&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQty4IZA&amp;usg=AOvVaw0D_dJBZAb5MKE8HSK9MZ46">Learn more</a></div><div align="center"><a class="rEM8G" href="/url?q=https://accounts.google.com/ServiceLogin%3Fcontinue%3Dhttps://www.google.com/search%253Fsca_esv%253D2eee718c337252b9%2526q%253Dpure%252Bfunctions%26hl%3Den&amp;opi=89978449&amp;sa=U&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQxs8CCGU&amp;usg=AOvVaw02hm5D0iUHUaJXR7-7dv1f">Sign in</a></div><div><table class="bookcf"><tbody class="InWNIe"><tr><td><a class="rEM8G" href="https://www.google.com/preferences?hl=en&amp;sa=X&amp;ved=0ahUKEwiY_PfOhdOLAxWncGwGHSvbMHYQv5YECGY">Settings</a></td><td><a class="rEM8G" href="https://www.google.com/intl/en_sg/policies/privacy/">Privacy</a></td><td><a class="rEM8G" href="https://www.google.com/intl/en_sg/policies/terms/">Terms</a></td></tr></tbody></table></div></div><div> </div></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10