On Wed, May 6, 2009 at 7:44 PM, Daniel Peebles wrote:
> Keep in mind that using lists for your parameters means you lose
> static guarantees that you've passed the correct number of arguments
> to a function (so you could crash at runtime if you pass too few or
> too many parameters to a function
Keep in mind that using lists for your parameters means you lose
static guarantees that you've passed the correct number of arguments
to a function (so you could crash at runtime if you pass too few or
too many parameters to a function).
On Wed, May 6, 2009 at 11:41 AM, Nico Rolle wrote:
> super
super nice.
best solution for me so far.
big thanks.
regards
2009/5/6 Victor Nazarov :
> On Tue, May 5, 2009 at 8:49 PM, Nico Rolle wrote:
>>
>> Hi everyone.
>>
>> I have a problem.
>> A function is recieving a lambda expression like this:
>> (\ x y -> x > y)
>> or like this
>> (\ x y z a -> (x >
isn't doLam just id with an Ord restriction there?
On Wed, May 6, 2009 at 5:55 AM, Victor Nazarov
wrote:
> On Tue, May 5, 2009 at 8:49 PM, Nico Rolle wrote:
>>
>> Hi everyone.
>>
>> I have a problem.
>> A function is recieving a lambda expression like this:
>> (\ x y -> x > y)
>> or like this
>>
On Tue, May 5, 2009 at 8:49 PM, Nico Rolle wrote:
> Hi everyone.
>
> I have a problem.
> A function is recieving a lambda expression like this:
> (\ x y -> x > y)
> or like this
> (\ x y z a -> (x > y) && (z < a)
>
> my problem is now i know i have a list filled with the parameters for
> the lamb
On 6 May 2009, at 4:49 am, Nico Rolle wrote:
Hi everyone.
I have a problem.
A function is recieving a lambda expression like this:
(\ x y -> x > y)
or like this
(\ x y z a -> (x > y) && (z < a)
Your first function has type
Ord a => a -> a -> Bool
so your list of parameters must have
Nico Rolle writes:
> A function is recieving a lambda expression like this:
> (\ x y -> x > y)
> or like this
> (\ x y z a -> (x > y) && (z < a)
And the type of that function is..?
> my problem is now i know i have a list filled with the parameters for
> the lambda expression. but how can i c
eral way. But unless you are just using it for
syntactic sugar (which seems unlikely for this use case), it's usually
a signal that you are doing something wrong.
-- ryan
>>> Von: Ryan Ingram
>>> Gesendet: 05.05.09 18:58:32
>>> An: Nico Rolle
>>> CC
This is a Hard Problem in Haskell.
Let me ask you, how many parameters does this function take?
a = (\x -> x)
How many parameters does this function take?
b = (\f x -> f x)
How many parameters does this function take?
c = (\f x y -> f x y)
What if I call
a (+)?
-- ryan
On Tue, May 5, 2009 a
Short answer: that's impossible.
Well, with some oleging it should be possible, but the very fact that
you're trying to do something like this indicates that you're doing
something wrong. Where did this list of parameters came from? May be,
you can apply your function to them one at a time,
Hi everyone.
I have a problem.
A function is recieving a lambda expression like this:
(\ x y -> x > y)
or like this
(\ x y z a -> (x > y) && (z < a)
my problem is now i know i have a list filled with the parameters for
the lambda expression.
but how can i call that expression?
[parameters] is my
11 matches
Mail list logo