hommage-0.0.5: doc/Sound.Hommage.Misc.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><TITLE
>Sound.Hommage.Misc</TITLE
><LINK HREF = "haddock.css" REL = "stylesheet" TYPE = "text/css"
></HEAD
><BODY
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "topbar"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD
><IMG SRC = "haskell_icon.gif" WIDTH = "16" HEIGHT = "16" ALT = " "
></TD
><TD CLASS = "title"
></TD
><TD CLASS = "topbut"
><A HREF = "Sound.Hommage.html"
>Parent</A
></TD
><TD CLASS = "topbut"
><A HREF = "index.html"
>Contents</A
></TD
><TD CLASS = "topbut"
><A HREF = "doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "modulebar"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD
><FONT SIZE = "6"
>Sound.Hommage.Misc</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF = "#1"
> Imperative control structure</A
></DT
><DT
><A HREF = "#2"
> Usefull list functions </A
></DT
><DT
><A HREF = "#3"
> More usefull functions</A
></DT
><DT
><A HREF = "#4"
> Embedding IO in a list (-map)</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
>Synopsis</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "body"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afor"
>for</A
> :: (Monad m) => a -> (a -> Bool) -> (a -> a) -> (a -> m b) -> m ()</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afor'"
>for'</A
> :: (Monad m) => a -> (a -> Bool) -> (a -> a) -> b -> (a -> b -> m b) -> m b</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Amap_"
>map_</A
> :: (a -> b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afoldr_"
>foldr_</A
> :: (a -> b -> b) -> b -> [a] -> b</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Amerge"
>merge</A
> :: (a -> a -> a) -> [a] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AmergeSet"
>mergeSet</A
> :: ([a] -> b) -> [[a]] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Auneitherlist"
>uneitherlist</A
> :: [Either a b] -> ([a], [b])</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Awalk"
>walk</A
> :: ([a] -> [b]) -> [a] -> ([a], [b])</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aappendmaps"
>appendmaps</A
> :: [[a] -> [b]] -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aappendmaps'"
>appendmaps'</A
> :: [[a] -> [b]] -> [a] -> [[b]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aqsort"
>qsort</A
> :: (a -> a -> Bool) -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AqsortM"
>qsortM</A
> :: (Monad m) => (a -> a -> m Bool) -> [a] -> m [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Ahead_opt"
>head_opt</A
> :: a -> [a] -> a</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AnewFilePath"
>newFilePath</A
> :: (Int -> FilePath) -> IO FilePath</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinList"
>inList</A
> :: IO (Maybe a -> IO (Maybe b)) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinList'"
>inList'</A
> :: IO (a -> IO b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinList''"
>inList''</A
> :: IO (a -> IO (Maybe b)) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AtoList"
>toList</A
> :: IO (IO a) -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AtoList'"
>toList'</A
> :: IO (IO (Maybe a)) -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinListE"
>inListE</A
> :: IO (Either (Maybe a -> IO (Maybe b)) (Maybe a -> IO (Maybe c))) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinListE'"
>inListE'</A
> :: IO (Either (a -> IO b) (a -> IO c)) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AinListE''"
>inListE''</A
> :: IO (Either (a -> IO (Maybe b)) (a -> IO (Maybe c))) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AtoListE"
>toListE</A
> :: IO (Either (IO a) (IO b)) -> Either [a] [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3AtoListE'"
>toListE'</A
> :: IO (Either (IO (Maybe a)) (IO (Maybe b))) -> Either [a] [b]</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "1"
> Imperative control structure</A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afor"
></A
><B
>for</B
> :: (Monad m) => a -> (a -> Bool) -> (a -> a) -> (a -> m b) -> m ()</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afor'"
></A
><B
>for'</B
> :: (Monad m) => a -> (a -> Bool) -> (a -> a) -> b -> (a -> b -> m b) -> m b</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "2"
> Usefull list functions </A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Amap_"
></A
><B
>map_</B
> :: (a -> b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "doc"
> a pseudo-strict map version. does not touch the elements but reconstructs the whole list
structure before the function is applied to the value</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afoldr_"
></A
><B
>foldr_</B
> :: (a -> b -> b) -> b -> [a] -> b</TD
></TR
><TR
><TD CLASS = "doc"
> a pseudo-strict foldr version. does not touch the elements but reconstructs the whole list
structure before the function is applied to the values. </TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Amerge"
></A
><B
>merge</B
> :: (a -> a -> a) -> [a] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "doc"
> Similar to zipWith, but the result has the length of the longer input list.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AmergeSet"
></A
><B
>mergeSet</B
> :: ([a] -> b) -> [[a]] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Auneitherlist"
></A
><B
>uneitherlist</B
> :: [Either a b] -> ([a], [b])</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Awalk"
></A
><B
>walk</B
> :: ([a] -> [b]) -> [a] -> ([a], [b])</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aappendmaps"
></A
><B
>appendmaps</B
> :: [[a] -> [b]] -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aappendmaps'"
></A
><B
>appendmaps'</B
> :: [[a] -> [b]] -> [a] -> [[b]]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aqsort"
></A
><B
>qsort</B
> :: (a -> a -> Bool) -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AqsortM"
></A
><B
>qsortM</B
> :: (Monad m) => (a -> a -> m Bool) -> [a] -> m [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "3"
> More usefull functions</A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Ahead_opt"
></A
><B
>head_opt</B
> :: a -> [a] -> a</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AnewFilePath"
></A
><B
>newFilePath</B
> :: (Int -> FilePath) -> IO FilePath</TD
></TR
><TR
><TD CLASS = "doc"
> the given function must create a filepath using the Int-argument. The filepath must be
different for different arguments. <TT
><A HREF = "Sound.Hommage.Misc.html#v%3AnewFilePath"
>newFilePath</A
></TT
> works like Gödels mu-operator and terminates
only if the filepath does not exist.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "4"
> Embedding IO in a list (-map)</A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinList"
></A
><B
>inList</B
> :: IO (Maybe a -> IO (Maybe b)) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinList'"
></A
><B
>inList'</B
> :: IO (a -> IO b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinList''"
></A
><B
>inList''</B
> :: IO (a -> IO (Maybe b)) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AtoList"
></A
><B
>toList</B
> :: IO (IO a) -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AtoList'"
></A
><B
>toList'</B
> :: IO (IO (Maybe a)) -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinListE"
></A
><B
>inListE</B
> :: IO (Either (Maybe a -> IO (Maybe b)) (Maybe a -> IO (Maybe c))) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinListE'"
></A
><B
>inListE'</B
> :: IO (Either (a -> IO b) (a -> IO c)) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AinListE''"
></A
><B
>inListE''</B
> :: IO (Either (a -> IO (Maybe b)) (a -> IO (Maybe c))) -> [a] -> Either [b] [c]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AtoListE"
></A
><B
>toListE</B
> :: IO (Either (IO a) (IO b)) -> Either [a] [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3AtoListE'"
></A
><B
>toListE'</B
> :: IO (Either (IO (Maybe a)) (IO (Maybe b))) -> Either [a] [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "botbar"
>Produced by <A HREF = "http://www.haskell.org/haddock/"
>Haddock</A
> version HADDOCK_VERSION</TD
></TR
></TABLE
></BODY
></HTML
>