Re: [racket-users] Quickscript of the day: Extract to function

2020-05-09 Thread Laurent
Major update: - put-function is much faster, by triggering check-syntax as early as possible and avoiding its re-computation. - More warnings and error reporting (in particular regarding mutated variables). - Added more information at the top of the script file, in particular some caveats. Please

Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Stephen De Gabrielle
Awesome - keep them coming. You should feature one in each Racket-News! Stephen On Thu, 7 May 2020 at 10:33, Laurent wrote: > Have you ever wanted to extract a block of code out of its context and > wrap it in a function? > > Have you ever *not* done it because of the cognitive load(*) of figu

Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Andre Garzia
that is really cool! thanks for sharing! On Thu, 7 May 2020 at 10:33, Laurent wrote: > Have you ever wanted to extract a block of code out of its context and > wrap it in a function? > > Have you ever *not* done it because of the cognitive load(*) of figuring > out the function arguments and the

Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Dexter Lagan
Nice!! Yay for laziness. On Thu, May 7, 2020 at 11:33 AM Laurent wrote: > Have you ever wanted to extract a block of code out of its context and > wrap it in a function? > > Have you ever *not* done it because of the cognitive load(*) of figuring > out the function arguments and the return value

[racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Laurent
Have you ever wanted to extract a block of code out of its context and wrap it in a function? Have you ever *not* done it because of the cognitive load(*) of figuring out the function arguments and the return values? Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using check-syntax, the