Skip to content

Conversation

@kamil-kielczewski
Copy link
Contributor

create multi-arguments functions

create multi-arguments functions
@hazzik
Copy link
Contributor

hazzik commented Aug 30, 2020

If you want even more arguments for less characters you can do following:

"return(" + []["slice"]["call"](false+"") + ")=>f+t"

@aemkei
Copy link
Owner

aemkei commented Aug 31, 2020

Well, that is a nice hack to allow multiple args.

Fixes - typos and
I change map( (f,t)=>f+t ) to map( (x,i)=>x+i ) to more traditional/redable version (because here I want to show technique without focus of size-code optimalization
In regexp part I use this technique which simplify this task, but I left old way because in some cases I think it can be useful
change fill to flat (which gives smaller size and not decrease readability)
add info about optimization
@kamil-kielczewski
Copy link
Contributor Author

kamil-kielczewski commented Aug 31, 2020

@hazzik Finally I add info about optimization trick which is very clever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants