Commits

Maxim Moiseev committed 0e27f43

minor fixes

  • Participants
  • Parent commits 25825a1

Comments (0)

Files changed (1)

File foonc/foonc.py

 def flip(f):
     '''Creates a function taking a reversed list of arguments.
     Keyword arguments remain unchanged.'''
-    def _fliped(*args, **kwargs):
+    def _flipped(*args, **kwargs):
         return f(*reversed(args), **kwargs)
     return _flipped
 
 def _compose2(f, g):
-    def _compose_innner(*args, **kwargs):
+    def _compose_inner(*args, **kwargs):
         return f(g(*args, **kwargs))
     return _compose_inner
 
         fs = fs[0]
     return reduce(_compose2, fs)
 
-def _Foonc(object):
+def wrap(f):
+    return _Foonc(f)
+
+class _Foonc(object):
     '''Somewhat useful function wrapper'''
     def __init__(self, f):
         self._f = f
 
-    def __call__(*args, **kwargs):
+    def __call__(self, *args, **kwargs):
         return self._f(*args, **kwargs)
 
     @staticmethod