Maxim Moiseev avatar Maxim Moiseev committed 0e27f43

minor fixes

Comments (0)

Files changed (1)

 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.