> > Where do we draw the line? How much of the behaviour of the
> > function do we want to move into the header?
>
> Well obviously we don't draw the line until we've fallen down the
> slippery slope and the entire body of the function is part of the
> header!
>

Sure, what's the problem? :-)

def hof(*, op=lambda F: lambda x: F(x), fn=lambda x: x**2, val=None):
    # Default is squaring, do what you want.
    return op(fn)(val)

-- 
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LUD723DCIWI7D3XR54JALXG5MSMQP5J2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to