Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymous function support #87

Closed
remixz opened this issue Jun 8, 2014 · 7 comments
Closed

Anonymous function support #87

remixz opened this issue Jun 8, 2014 · 7 comments

Comments

@remixz
Copy link
Member

remixz commented Jun 8, 2014

No description provided.

@off-by-some
Copy link
Member

I'm thinking we should have a keyword for anonymous functions, to make it more consistent across the board, something like,

such Anonymous much foo bar baz
    wow [foo, bar, baz]

It might be funny to even have something like

such 4chan much foo bar etc

Though that's just me being tired and slap happy

@Griffork
Copy link

Griffork commented Jun 9, 2014

such unknown much foo bar baz?

@remixz
Copy link
Member Author

remixz commented Jun 9, 2014

I was thinking such anon much foo bar bat

@off-by-some
Copy link
Member

to retouch on this, i was thinking much by itself seems good and consistent:

shh Functions with a name and no parameters
such burp
  console.loge "Burp!" 

shh Functions with a name and  parameters
such eat much weight
  wow weight more 1

shh Functions without a name, and parameters
much number
   wow number more 1

this may involve finding a new word for for though

EDIT: Another example of using much as anonymous functions:

trained

so "ramda" as R

very ints is [1,2,3]

such speak much string
  plz console.loge with string

very double is plz R.map with much x 
  wow x * 2

very doubleInts is plz double with ints    

speak with doubleInts

@AnEmortalKid
Copy link
Member

partially supported here #104 , with wacky syntax such much. Ideally, we'd find a better word for for and we could break passivity and have much a b be the declaration for anonymous functions.

@AnEmortalKid
Copy link
Member

AnEmortalKid commented Oct 5, 2017

We can close once #104 is merged.

@AnEmortalKid
Copy link
Member

Closing since tracked in #114

@AnEmortalKid AnEmortalKid mentioned this issue Oct 11, 2017
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants