[plt-scheme] How to abstract in this situation

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Thu Jan 25 06:10:04 EST 2007

You'll kick yourself when you read this! :)

What about a lambda abstraction, the most basic form of
abstraction there is?

N.

--- wooks <wookiz at hotmail.com> wrote:
...
> 
> Case 1
> (let this and lambda that etc
> 
> (cond
>   [(= x y) currentcomputedvalue]
>   [else (recurse currentcomputedvalue)
> 
> Case 2
> (let this and  lambda that etc
> 
> (cond
>   [(> x y) startingvalue]
>   [(= x y) currentcomputedvalue]
>   [else append (filter startingvalue) (recurse
> currentcomputedvalue)])
> 
...

> In seeking to combine them is there a way  I can do
> better than the
> obvious pass a parameter denoting which case I am running
> and  then ...


Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/


 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097


Posted on the users mailing list.