G
grocery_stocker
Given the following....
def double(val):
return val.bind(lambda x: val.return_(x*2))
I get "AttributeError: 'int' object has no attribute 'bind' " when I
try to do the following
double(2)
Below is the output...
[cdalten@localhost ~]$ python
Python 2.4.3 (#1, Oct 1 2006, 18:00:19)
[GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information..... return val.bind(lambda x: val.return_(x*2))
....Traceback (most recent call last):
File "<stdin>", line 1, in ?
def double(val):
return val.bind(lambda x: val.return_(x*2))
I get "AttributeError: 'int' object has no attribute 'bind' " when I
try to do the following
double(2)
Below is the output...
[cdalten@localhost ~]$ python
Python 2.4.3 (#1, Oct 1 2006, 18:00:19)
[GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information..... return val.bind(lambda x: val.return_(x*2))
....Traceback (most recent call last):
File "<stdin>", line 1, in ?