Created
June 14, 2013 09:14
-
-
Save JakubOboza/5780560 to your computer and use it in GitHub Desktop.
List Comperhansions
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
-- ghci example | |
let infinite_list = [1..n] | |
take 50 infinite_list | |
-- works fine and its great :) | |
let triangles = [(a,b,c) | a <-[1..], b<-[1..], c<-[1..], c^2 == a^2 + b^2] | |
take 50 triangles | |
-- boom :) is list comp* strict evaluated ? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment