I love that. It's great. Definitely going in my .ghci file.
On 20 June 2010 12:28, Liam O'Connor <[email protected]> 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 -> b -> c] -> a -> [b] -> [c] > swing find :: forall a. [a -> Bool] -> a -> Maybe (a -> Bool) > -- applies each of the predicates to the given value, returning the > first predicate which succeeds, if any > swing partition :: forall a. [a -> Bool] -> a -> ([a -> Bool], [a -> Bool]) > > > Essentially, the main use case seems to be transforming HOFs that > operate on a list of values and a single function into HOFs that > operate on a list of functions and a single value. > > Cheers. > ~Liam > > > > On 19 June 2010 19:30, Limestraël <[email protected]> wrote: >> ??? >> What does exactly swing do ? >> >> 2010/6/18 Bulat Ziganshin <[email protected]> >>> >>> 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, >>> Bulat mailto:[email protected] >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> [email protected] >>> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> [email protected] >> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
