Re: [racket-users] threading macros

2017-06-26 Thread Sanjeev Sharma
yeah, trying to apply the idea unreasonably beyond its intent. Thanks for the replies folks. On Sunday, June 25, 2017 at 2:52:00 PM UTC-4, Alexis King wrote: > As written, the simple answer to your question is to use begin0 or > begin, depending on if you are using ~> or ~>>. > > > (~> 3 (b

Re: [racket-users] threading macros

2017-06-25 Thread Alexis King
As written, the simple answer to your question is to use begin0 or begin, depending on if you are using ~> or ~>>. > (~> 3 (begin0 (displayln "hi!")) (* 2)) hi! 6 But as Greg mentions, this is not very useful, and it probably isn’t what you want, since the evaluated expression can onl

[racket-users] threading macros

2017-06-25 Thread Sanjeev Sharma
is there a way to do a calculation in the middle of the chain that takes no arguments? In other words, exempt some operations in the chain from taking any arguments. Suppose one's doing a calculation of interest earned on an investment and one is threading a running balance through the chain,