question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle providing a lambda function when chaining methods in AskScript

See original GitHub issue
ask {
	const double = fun(s:string):string {
    s:concat(s)
	}

  text :call(fun(s:string): string {
    s:double // same as s:double()
  })
}

returns the value of text variable instead of text + text.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
mhagmajercommented, Jun 5, 2020

Does the current call implementation reflect what you mean by Javascript-call-just-without-this-keyword?

Yes, it should (see https://github.com/xFAANG/askql/issues/46)

1reaction
czerwinskilukasz1commented, Jun 5, 2020

As for porting apply and bind directly from Javascript, let’s create a separate issue (or issues) for them and do them later that v.1.1 as I think they are not critical features.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lambda JS #4: Chaining - Medium
You may chain methods as long as the method belongs to the last returned value type (if a array was returned, the method...
Read more >
Best practices for working with AWS Lambda functions
Function code · Separate the Lambda handler from your core logic. · Take advantage of execution environment reuse to improve the performance of...
Read more >
Demystifying chaining in Javascript - Advanced Web Machinery
The final step is to attach the processing functions in a chainable way. To do this, add a function with the same name,...
Read more >
Chaining Functions and using an anonymous function
So I made a pass() function that accepts a function as an argument so that I could use an anonymous function to manipulate...
Read more >
Understanding Method Chaining In Javascript - segunolalive
For this, we'll add an instance property to our class to hold the result of each function/method call.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found