Last active
August 29, 2015 14:21
-
-
Save DuqueDeTuring/0d1d98beb3bcb4f3b3a9 to your computer and use it in GitHub Desktop.
Ejemplos en Haskell
This file contains hidden or 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
-- Generadores y "guardias" | |
{-- | |
Sea la tupla (x,y) tal que, | |
x ∈ [1..10] ^ x < 3 | |
y ∈ [11,13] ^ y < 12 | |
--} | |
[(x,y) | x <- [1..10], y <- [11,13], x<3, y<12] | |
-- Fibonacci | |
fib = 1 : 1 : [ a+b | (a,b) <- zip fib (tail fib)] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment