#NEWLINE# def test_curry_simple( ) : #NEWLINE# #INDENT# cmul = curry ( mul ) #NEWLINE# double = cmul ( 2 ) #NEWLINE# assert callable ( double ) #NEWLINE# assert ( double ( 10 ) == 20 ) #NEWLINE# assert ( repr ( cmul ) == repr ( mul ) ) #NEWLINE# cmap = curry ( map ) #NEWLINE# assert ( list ( cmap ( inc ) ( [ 1 , 2 , 3 ] ) ) == [ 2 , 3 , 4 ] ) #NEWLINE# assert raises ( TypeError , ( lambda : curry ( ) ) ) #NEWLINE# assert raises ( TypeError , ( lambda : curry ( { #NEWLINE# #INDENT# 1 : 2 , #NEWLINE# #UNINDENT# } ) ) )