Created
January 16, 2014 13:19
-
-
Save fredyr/8454877 to your computer and use it in GitHub Desktop.
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
f x = (42-x)^2 | |
impr = [(x, f x) | x <- [0, 0.1 ..]] | |
opt goal = head $ dropWhile (\(x, err) -> err >= goal) impr |
Author
fredyr
commented
Jan 16, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment