Jump to content

Binary digits: Difference between revisions

→‎Python :: Custom functions: Removed one unused primitive
m (→‎Python :: Custom functions: Used divmod in lieu of two operators in boolsFromInt)
(→‎Python :: Custom functions: Removed one unused primitive)
Line 3,135:
'''Integer enumeration from m to n.'''
return lambda n: list(range(m, 1 + n))
 
 
# fmapTuple (<$>) :: (a -> b) -> (a, a) -> (a, b)
def fmapTuple(f):
'''A pair in which f has been applied to
the second item.'''
return lambda tpl: (tpl[0], f(tpl[1]))
 
 
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.