mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Added mapinto.
This commit is contained in:
parent
25224a79a1
commit
c5903a9591
@ -821,6 +821,10 @@ def toBool(s):
|
||||
else:
|
||||
raise ValueError, 'Invalid string for toBool: %r' % s
|
||||
|
||||
def mapinto(f, L):
|
||||
for (i, x) in enumerate(L):
|
||||
L[i] = f(x)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules['__main__'])
|
||||
|
Loading…
Reference in New Issue
Block a user