-
Notifications
You must be signed in to change notification settings - Fork 61
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
Functions & Macros #211
Comments
so one of the things that I still want to have available in LiveCodeLang is first class functions and higher order functions. this would make it easy to have functions like the grid one above. This is currently how the times loop actually works. At the moment I'm making live code lang very basic because I still need to get to grips with this language design stuff first, but extending it should be reasonably easy once everything is done. Macros are something I'm less sure about. I think they can be powerful, but I'd rather look at other ways of creating that sort of functionality using higher order functions and language features. Ongoing discussion I guess |
I think that we could simplify the notation of
|
Oh, actually, that is exactly what I had in mind. Nice! I just didn't know how easy it was to pass a code block by creating an anonymous function with So this feature is in LCL and I just didn't know it, so feel free to close ☑️ |
closing. macros are outstanding but maybe we can live a bit more with just what we have. |
higher order functions solve everything! or maybe I've just been coding scala and haskell too long... |
Allow the user to define functions and shorthands for calling those functions. The functions could be shared through a mechanism like #212.
1) Functions
Create syntax for defining functions that can take a code block as an argument. Like
for
2) Macros
Letting users define rewrite rules that make these functions easier to write:
The text was updated successfully, but these errors were encountered: