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 <limestr...@gmail.com> wrote: > ??? > What does exactly swing do ? > > 2010/6/18 Bulat Ziganshin <bulat.zigans...@gmail.com> >> >> 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:bulat.zigans...@gmail.com >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe