Re: [Freevo-cvslog] Kaa r4290 - trunk/base/doc/core
Hans Meine <[email protected]>
| Newsgroups | gmane.comp.video.freevo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Montag 01 Februar 2010, Jason Tackaberry wrote:
> Fix the terminology. Currying is somethign else.
> [...]
> One very common use-case of Callable objects is any time a callback
> function is required, such as with signals (described later). They can be
> used to construct -partial functions; the following example demonstrates
> currying::
>
> +partial functions::
> >>> square = kaa.Callable(pow, 2)
> >>> print square(5)
In fact, this looks more like currying than like a partial function to me. ;-)
(I.e. pow is curried, in the sense that arguments are 'attached'/'filled in'.)
Although square will be a partial function in the sense that it cannot be
called with arbitrarily typed objects, this is obviously not what is meant
here.
However, I would have inserted 'even' into "They can [even] be used to
construct...", or is this the only point of Callable objects?
--
Ciao, / / .o.
/--/ ..o
/ / ANS ooo
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAktnLZQACgkQJ8iuK6bBAPOHagCdEqEiqbLsJ9hJ9xb8hiquCq3s dJcAoID08OkZb0Q6Vml2b1SRFn2dEv0k =65cv -----END PGP SIGNATURE-----