I\'m trying to write the Haskel function \'splitEvery\' in Python. Here is it\'s definition:
splitEvery :: Int -> [e] -> [[e]] @\'splitEvery\' n@ s
Here is how you deal with list vs iterator:
def isList(L): # Implement it somehow - returns True or false ... return (list, lambda x:x)[int(islist(L))](result)