Binary digits: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
m →‎Python :: Custom functions: Used divmod in lieu of two operators in boolsFromInt
Hout (talk | contribs)
→‎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]))