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

Will generation functions be supported later #36

Open
SGAMERyu opened this issue Nov 14, 2022 · 2 comments
Open

Will generation functions be supported later #36

SGAMERyu opened this issue Nov 14, 2022 · 2 comments

Comments

@SGAMERyu
Copy link

Will we support generation functions in the future? This allows us to avoid using strings to generate template functions

@pi0
Copy link
Member

pi0 commented Nov 14, 2022

Hi. Can you please send add some examples for generation functions?

@ineshbose
Copy link

I'm not sure what "generation functions" mean, but I'm hoping to generate functions such as:

const myFunc = (name) => `Hello ${name}`    // or { return `Hello ${name}` }
function myFunc2 (name) { return `Hello ${name}` }

const higherOrderFun = (func) => {
  return (name) => { return func(name) }
}

// should evaluate to (name) => { return ((n) => `Bye ${n}`)(name) }
const byeFunc = higherOrderFun((n) => `Bye ${n}`)

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

No branches or pull requests

3 participants