Last active
December 16, 2015 14:19
-
-
Save yangsu/5447819 to your computer and use it in GitHub Desktop.
Haskell Simple Monad
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 Main where | |
stagger :: (Num t) => t -> t | |
stagger d = d + 2 | |
crawl d = d + 1 | |
treasureMap d = | |
crawl ( | |
stagger ( | |
stagger d)) | |
letTreasureMap (v, d) = let d1 = stagger d | |
d2 = stagger d1 | |
d3 = crawl d2 | |
in d3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment