CRC-32: Difference between revisions
m
→Python :: Composition of pure functions
(→{{header|JavaScript}}: Tidied.) |
|||
Line 1,866:
(a ^ ord(c)) & 0xff
],
(0xffffffff)
) ^ 0xffffffff
Line 1,883:
#
# index (!!) :: [a] -> Int -> a
Line 1,897:
# iterate :: (a -> a) -> a -> Gen [a]
def iterate(f):
'''An infinite list of repeated
applications of f to x.
'''
def go(x):
v = x
Line 1,903 ⟶ 1,905:
yield v
v = f(v)
return
|