Re: [racket-users] Simple question on begin and call-by-value

2016-01-08 Thread Eduardo Bonelli
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

Re: [racket-users] Simple question on begin and call-by-value

2016-01-08 Thread 'William J. Bowman' via Racket Users
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

[racket-users] Simple question on begin and call-by-value

2016-01-08 Thread Eduardo Bonelli
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