[racket-users] Re: threading macros

2017-06-25 Thread Jack Firth
If you have a chain of single-argument functions and you want to do something side-effectful in the middle of the chain with just the input at that point in the chain, you can make a function that converts a void-returning function into a function that returns its argument: (define ((side-effec

Re: [racket-users] Re: threading macros

2017-06-25 Thread Greg Hendershott
This might not be a good fit for threading macros. If you need to calculate some extra, intermediate values, I definitely wouldn't recommend `set!`-ing them on the side in a threading macro (if that's what you had in mind). Threading macros produce a single value. If you need to produce multiple

[racket-users] Re: threading macros

2017-06-25 Thread Sanjeev Sharma
The simplest solution occurred to me after a few minutes - a separate function that ignores the first value (or the last with ~>> ) But I'm still wondering if there's a provision for this in the macro. -- You received this message because you are subscribed to the Google Groups "Racket Users