Created
December 7, 2011 07:24
-
-
Save onlyshk/1441848 to your computer and use it in GitHub Desktop.
list lifting
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
plus :: [Int] -> [Int] -> [Int] | |
plus = liftM2 (+) | |
-- plus [1,2,3] [3,6,9] ---> [4,7,10, 5,8,11, 6,9,12] | |
-- plus [1..] [] ---> _|_ (i.e., keeps on calculating forever) | |
-- plus [] [1..] ---> [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment