browser engines 

webkit is still the only one which lets you do proper functional programming, huh

re: browser engines 

; { const sum = (() => {"use strict"; return (x,i=0) => x === 0 ? i+x : sum(x-1,i+x)})(); sum(5000000) }

Works On My Machine

Follow

re: browser engines 

@Lady why are you creating sum from a factory?

re: browser engines 

@wallhackio proper tail calls are only a thing in strict mode, which can't be set in functions which take default parameters, so i threw an IIFE around it

re: browser engines 

@Lady oh I did not know that. Thanks

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.