I love that. It's great. Definitely going in my .ghci file.
On 20 June 2010 12:28, Liam O'Connor wrote:
> swing map :: forall a b. [a -> b] -> a -> [b]
> swing any :: forall a. [a -> Bool] -> a -> Bool
> swing foldr :: forall a b. b -> a -> [a -> b -> b] -> b
> swing zipWith :: forall a b c. [a -
swing map :: forall a b. [a -> b] -> a -> [b]
swing any :: forall a. [a -> Bool] -> a -> Bool
swing foldr :: forall a b. b -> a -> [a -> b -> b] -> b
swing zipWith :: forall a b c. [a -> b -> c] -> a -> [b] -> [c]
swing find :: forall a. [a -> Bool] -> a -> Maybe (a -> Bool)
-- applies each of t
???
What does exactly swing do ?
2010/6/18 Bulat Ziganshin
> Hello Martin,
>
> Thursday, June 17, 2010, 11:02:31 PM, you wrote:
>
> > But what if I want to apply a list of functions to a single argument. I
> can
>
> one more answer is "swing map":
>
> http://www.haskell.org/haskellwiki/Pointfree
Hello Martin,
Thursday, June 17, 2010, 11:02:31 PM, you wrote:
> But what if I want to apply a list of functions to a single argument. I can
one more answer is "swing map":
http://www.haskell.org/haskellwiki/Pointfree#Swing
--
Best regards,
Bulatmailto:bulat.zig
map (\function -> function argument) functions
map ($ argument) functions
map (\firstArgument
-> function firstArgument secondArgument thirdArgument) xs
On 17.06.10 22:02, Martin Drautzburg wrote:
Hello all
The standard map function applies a single function to a list of arguments.
But what
Martin Drautzburg writes:
> Hello all
>
> The standard map function applies a single function to a list of arguments.
> But what if I want to apply a list of functions to a single argument. I can
> of course write such a function, but I wonder if there is a standard way of
> doing this,
>
listFs = [f1, f2, f3]
map ($ x) listFs -- same as [f1 x, f2 x, f3 x]
f x y z = ...
map (\x -> f x u v) xs
On 17 Jun 2010, at 23:02, Martin Drautzburg wrote:
Hello all
The standard map function applies a single function to a list of
arguments.
But what if I want to apply a list of functions
Martin Drautzburg wrote:
The standard map function applies a single function to a list of arguments.
But what if I want to apply a list of functions to a single argument.
So your list of arguments is actually a list of functions. But since
functions are first-class values, that shouldn't be a
Martin Drautzburg wrote:
Hello all
The standard map function applies a single function to a list of arguments.
But what if I want to apply a list of functions to a single argument. I can
of course write such a function, but I wonder if there is a standard way of
doing this,
The magical i
Martin.Drautzburg:
> Hello all
>
> The standard map function applies a single function to a list of arguments.
> But what if I want to apply a list of functions to a single argument. I can
> of course write such a function, but I wonder if there is a standard way of
> doing this,
map ($ 2)
On Jun 17, 2010, at 12:02 PM, Martin Drautzburg wrote:
The standard map function applies a single function to a list of
arguments.
But what if I want to apply a list of functions to a single
argument. I can
of course write such a function, but I wonder if there is a standard
way of
doing
Hello all
The standard map function applies a single function to a list of arguments.
But what if I want to apply a list of functions to a single argument. I can
of course write such a function, but I wonder if there is a standard way of
doing this,
Related to that is the problem, that the fun
12 matches
Mail list logo