Re: [racket-users] Simple question on begin and call-by-value
Dear William, You are quite right. Sorry for the silly question and thanks for the quick reply. E. On Friday, January 8, 2016 at 6:05:35 PM UTC-3, William J. Bowman wrote: > ((lambda x x) (void)) returns a list containing the void object. Perhaps you > meant (lambda (x) (begin x))? > > -- > William J. Bowman -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Simple question on begin and call-by-value
On Fri, Jan 08, 2016 at 12:58:14PM -0800, Eduardo Bonelli wrote: > Hello, > > Why do the values of these two expressions differ? > > > (begin (void)) > > ((lambda x (begin x)) (void)) > '(#) > > In the second case, I understand that CBV would evaluate the argument > "(void)" to obtain the (untyped) value "#". It then passes this on to > the function "((lambda x (begin x))", resulting in "(begin #)". So why > does this not evaluate to #? ((lambda x x) (void)) returns a list containing the void object. Perhaps you meant (lambda (x) (begin x))? -- William J. Bowman -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: PGP signature
[racket-users] Simple question on begin and call-by-value
Hello, Why do the values of these two expressions differ? > (begin (void)) > ((lambda x (begin x)) (void)) '(#) In the second case, I understand that CBV would evaluate the argument "(void)" to obtain the (untyped) value "#". It then passes this on to the function "((lambda x (begin x))", resulting in "(begin #)". So why does this not evaluate to #? E. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.