Re: functional programming idiom

2009-03-01 Thread Berlin Brown
On Mar 1, 12:19 pm, linh wrote: > thank you for the information > > On Mar 1, 5:09 pm, "Michel S." wrote: > > > On Mar 1, 11:02 am, "Michel S." wrote:> On Feb > > 28, 6:16 pm, linh wrote:> hello, > > > > what's the common idiom in functional programming regarding checking > > > > the validi

Re: functional programming idiom

2009-03-01 Thread linh
thank you for the information On Mar 1, 5:09 pm, "Michel S." wrote: > On Mar 1, 11:02 am, "Michel S." wrote:> On Feb 28, > 6:16 pm, linh wrote:> hello, > > > what's the common idiom in functional programming regarding checking > > > the validity of arguments to functions. i think this is call

Re: functional programming idiom

2009-03-01 Thread Michel S.
On Mar 1, 11:02 am, "Michel S." wrote: > On Feb 28, 6:16 pm, linh wrote:> hello, > > what's the common idiom in functional programming regarding checking > > the validity of arguments to functions. i think this is called > > defensive programming vs contract programming. > > Mostly defensive,

Re: functional programming idiom

2009-03-01 Thread Michel S.
On Feb 28, 6:16 pm, linh wrote: > hello, > what's the common idiom in functional programming regarding checking > the validity of arguments to functions. i think this is called > defensive programming vs contract programming. > Mostly defensive, I think. Some languages (e.g. PLT Scheme) have cont

functional programming idiom

2009-02-28 Thread linh
hello, what's the common idiom in functional programming regarding checking the validity of arguments to functions. i think this is called defensive programming vs contract programming. for example: ;; this first version of foo checks the validity of arguments inside foo (defn foo [context arg]