PAIR-M: PAIR-GENERIC: ftw :-)

On Thu, Dec 23, 2010 at 5:13 PM, beo wulf <[email protected]> wrote:

> Searching for "multimethod" brings up nothing on docs.factorcode.org --
> are multimethods supported in factor?
>
>
> On Thu, Dec 23, 2010 at 4:52 PM, William Schlieper <[email protected]>wrote:
>
>>  On 12/23/2010 7:39 PM, beo wulf wrote:
>>
>> The standard generic example is:
>>
>> GENERIC: area ( shape -- n )
>>
>> M: rectangle area
>>   [ width>> ] [ height>> ] bi * ;
>> M: circle area
>>   radius>> sq pi * ;
>>
>>
>> However, suppose instead I want (pseudo code below)
>>
>> GENERIC: transform ( transformer object -- object' )
>>
>> And now, I want "transform" to dispatch on both type_of(transformer) and
>> type_of(object). Is this possible?
>>
>> You're looking for multimethods.
>>
>>
>> Thanks!
>>
>>
>> ------------------------------------------------------------------------------
>> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
>> to consolidate database storage, standardize their database environment, and,
>> should the need arise, upgrade to a full multi-node Oracle RAC database
>> without downtime or disruptionhttp://p.sf.net/sfu/oracle-sfdevnl
>>
>>
>> _______________________________________________
>> Factor-talk mailing 
>> [email protected]https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
>> to consolidate database storage, standardize their database environment,
>> and,
>> should the need arise, upgrade to a full multi-node Oracle RAC database
>> without downtime or disruption
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> Factor-talk mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to