This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cartesian_product2 where | |
import Prelude hiding(product) | |
-- introduce mapa | |
map' :: (b->a) -> [b] -> [a] | |
map' g l = foldr' f [] l where | |
f x y = (g x) : y | |
foldr' :: (a -> b -> b) -> b -> [a] -> b | |
foldr' f z [] = z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cartesian_product1 where | |
import Prelude hiding(product) | |
product1 [] = [[]] | |
product1 (xs:xss) = | |
h xs (product1 xss) where | |
h [] xss = [] | |
h (x : xs) xss = | |
map (x:) xss ++ h xs xss | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/ | |
apt-get install git automake autoconf libtool pkg-config make g++ zlib1g-dev libcurl4-gnutls-dev | |
git clone https://github.com/MediaArea/ZenLib.git | |
git checkout v0.4.37 | |
cd ZenLib/Project/GNU/Library | |
./autogen.sh | |
./configure --enable-static | |
make -j4 |
NewerOlder