[plt-scheme] Re: My Scheme Probelm (fwd)

From: HZBilal (hzbilal at gmail.com)
Date: Tue Nov 28 11:15:44 EST 2006

Dear Matt,

Many thanks for your comments, I can do with every advice given :-)
I have been using the link shown below for Scheme and am finding it very 
useful for resolving my Scheme issues, so far :-S

Thank you.
HZBilal.


----- Original Message ----- 
From: "Matt Jadud" <mcj4 at kent.ac.uk>
To: "Danny Yoo" <dyoo at hkn.eecs.berkeley.edu>
Cc: <hzbilal at gmail.com>; <plt-scheme at list.cs.brown.edu>
Sent: Wednesday, November 15, 2006 6:06 PM
Subject: Re: [plt-scheme] Re: My Scheme Probelm (fwd)


> Hi HZBilal,
>
> I really think you should, if you can spare the time (it will pay off 
> immensely), stop trying to work on the code you're working on and instead 
> take a few days to work through How To Design Programs 
> (http://www.htdp.org/).
>
> To answer your specific question, you could, in the Interactions window in 
> DrScheme, try things like:
>
> > (and #t #t)
> #t
> > (and #t #f)
> #f
> > (or #t #f)
> #t
> > (or #f #f #f #t #f)
> #t
>
> and so on. However, the best thing you can do, assuming you don't have 
> serious mastery over Scheme, is to develop some. The best way I know to do 
> that is to work through some simpler exercises to get a feel for how to 
> define data structures, functions that operate over those structures, and 
> generally get a feel for how the language is used and written.
>
> If you take that approach, you'll find that the questions you're asking 
> will be much easier for people on this list to answer, and then you can 
> start looking at applying what you're learning to your specific 
> question/programming problem. That, and you'll be much more productive on 
> the problem if you're confident with the basics of the language, which it 
> seems like you're struggling with.
>
> Hope that helps,
> Matt
>
> Danny Yoo wrote:
>> Hi HZBilal,
>>
>> Please don't email me directly; I may not necessarily have the time to 
>> help you, or I may not be the best person to help you.  See:
>>
>>     http://catb.org/esr/faqs/smart-questions.html#noprivate
>>
>> for reasons why asking for help in private email is counterproductive 
>> compared to asking a forum.  I am forwarding your question to the 
>> plt-scheme mailing list so you can get appropriate help.
>>
>>
>> ---------- Forwarded message ----------
>> Date: Wed, 15 Nov 2006 15:43:11 -0000
>> From: HZBilal <hzbilal at gmail.com>
>> To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
>> Subject: Re: My Scheme Probelm
>>
>> Re: [plt-scheme] My Scheme ProbelmDear Danny,
>>
>> Is it possible some how to use AND and OR with Scheme, or something 
>> similar to that? I.e. for example my code wants to check using an IF 
>> statement if its red OR black then do this ELSE do that? So looking at my 
>> sample code below, instead of repeating the code for both formals-in and 
>> formals-out, it would be good if i can make it check for either then pick 
>> up otherwise ignore. However, if it is not possible, then how can you do 
>> this, whether with IF statements or any other conditions? 
>> (pdg-vertex-set-traverse (pdg-formals-in pdg) ;; Looking through each PDG 
>> for input parameters.
>>
>> (lambda(v)
>>
>> (abs-loc-set-traverse (pdg-vertex-ids-decl-uses v) ;; Looking through 
>> vertices to check if its the right type.
>>
>> (lambda(w)
>>
>> (display (abs-loc-name w) out-port)
>>
>> (newline out-port)
>>
>> #t))#t))
>>
>> (pdg-vertex-set-traverse (pdg-formals-out pdg) ;; Looking through each 
>> PDG for output parameters.
>>
>> (lambda(v)
>>
>> (abs-loc-set-traverse (pdg-vertex-ids-decl-uses v) ;; Looking through 
>> vertices to check if its the right type.
>>
>> (lambda(w)
>>
>> (display (abs-loc-name w) out-port)
>>
>> (newline out-port)
>>
>> #t))#t))
>>
>> Thank you very much for your time and help.
>> HZBilal.



Posted on the users mailing list.